2009-06-22 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 22 Jun 2009 16:03:33 +0000 (16:03 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 22 Jun 2009 16:03:33 +0000 (16:03 +0000)
PR server/10306
* remote.c (getpkt_or_notif_sane_1): Initialize val to -1.

gdb/ChangeLog
gdb/remote.c

index 430cbd8..0ef577e 100644 (file)
@@ -1,3 +1,8 @@
+2009-06-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR server/10306
+       * remote.c (getpkt_or_notif_sane_1): Initialize val to -1.
+
 2009-06-21  Michael Snyder  <msnyder@vmware.com>
 
        * inferior.h: Update ancient comment.
index 3fb7a70..6e8f69c 100644 (file)
@@ -6380,7 +6380,7 @@ getpkt_or_notif_sane_1 (char **buf, long *sizeof_buf, int forever,
   int c;
   int tries;
   int timeout;
-  int val;
+  int val = -1;
 
   /* We're reading a new response.  Make sure we don't look at a
      previously cached response.  */