[PATCH libXi] Add some () to shut up coverity

Peter Hutterer peter.hutterer at who-t.net
Thu Nov 10 20:49:11 PST 2011


Yes, this is an array of *nclasses pointers.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/XExtInt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/XExtInt.c b/src/XExtInt.c
index aa341e9..372956e 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -1528,7 +1528,7 @@ copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int *nclasses)
     ptr_wire = (char*)from;
     ptr_lib = to->classes;
     to->classes = next_block(&ptr_lib, *nclasses * sizeof(XIAnyClassInfo*));
-    memset(to->classes, 0, sizeof(*nclasses * sizeof(XIAnyClassInfo*)));
+    memset(to->classes, 0, sizeof((*nclasses) * sizeof(XIAnyClassInfo*)));
     len = 0; /* count wire length */
 
     for (i = 0; i < *nclasses; i++)
-- 
1.7.7.1



More information about the xorg-devel mailing list