]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid uninitialized read
authorPhilipp Stephani <phst@google.com>
Sat, 20 May 2017 14:57:58 +0000 (16:57 +0200)
committerPhilipp Stephani <phst@google.com>
Sun, 21 May 2017 19:50:36 +0000 (21:50 +0200)
* src/nsterm.m (ns_read_socket): Don't read uninitialized variable 'nevents'.

src/nsterm.m

index c8320130a875f3d0050a1438dc7bff58c556b870..e69aa43dd377ba1a3d655de5f6b9824283b30558 100644 (file)
@@ -4261,6 +4261,8 @@ ns_read_socket (struct terminal *terminal, struct input_event *hold_quit)
       q_event_ptr = NULL;
       unblock_input ();
     }
+  else
+    return -1;
 
   return nevents;
 }