XRecord: avoid use of uninitialised variables.
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 14 Aug 2009 05:00:15 +0000 (15:00 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 14 Aug 2009 05:02:28 +0000 (15:02 +1000)
Both variables are initialized inside an if condition but later checked for
NULL.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/XRecord.c

index 9c6fe87..2d76f5c 100644 (file)
@@ -411,9 +411,9 @@ XRecordGetContext(Display *dpy, XRecordContext context,
     xRecordGetContextReply     rep;
     int                        count, i, rn;
     xRecordRange       xrange;
-    XRecordRange       *ranges;
+    XRecordRange       *ranges = NULL;
     xRecordClientInfo   xclient_inf;
-    XRecordClientInfo  **client_inf, *client_inf_str;
+    XRecordClientInfo  **client_inf, *client_inf_str = NULL;
     XRecordState       *ret;
 
     XRecordCheckExtension (dpy, info, 0);