[PATCH 2/4] Xi: replace loop with memset

Peter Hutterer peter.hutterer at who-t.net
Mon Aug 26 18:00:13 PDT 2013


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 Xi/grabdev.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/Xi/grabdev.c b/Xi/grabdev.c
index 443ef56..9c6c429 100644
--- a/Xi/grabdev.c
+++ b/Xi/grabdev.c
@@ -175,10 +175,7 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count,
     int device;
     DeviceIntPtr tdev;
 
-    for (i = 0; i < EMASKSIZE; i++) {
-        mask[i].mask = 0;
-        mask[i].dev = NULL;
-    }
+    memset(mask, 0, EMASKSIZE * sizeof(struct tmask));
 
     for (i = 0; i < count; i++, list++) {
         device = *list >> 8;
-- 
1.8.2.1



More information about the xorg-devel mailing list