changeset 10996:724ce887ae63

poll: don't return uninitialized * lib/poll.c (poll) [WIN32_NATIVE]: Initialize "rc".
author Daniel P. Berrange <berrange@redhat.com>
date Wed, 07 Jan 2009 20:43:01 +0100
parents 4d35f63c0e40
children 92c82a6f26db
files ChangeLog lib/poll.c
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-07  Daniel P. Berrange  <berrange@redhat.com>
+
+	poll: don't return uninitialized
+	* lib/poll.c (poll) [WIN32_NATIVE]: Initialize "rc".
+
 2009-01-06  Jeremy Olexa <darkside@gentoo.org>  (tiny change)
 
 	avoid compile failure on AIX 6.1
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -1,7 +1,7 @@
 /* Emulation for poll(2)
    Contributed by Paolo Bonzini.
 
-   Copyright 2001, 2002, 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright 2001-2003, 2006-2009 Free Software Foundation, Inc.
 
    This file is part of gnulib.
 
@@ -405,7 +405,7 @@
   BOOL poll_again;
   MSG msg;
   char sockbuf[256];
-  int rc;
+  int rc = 0;
   nfds_t i;
 
   if (nfd < 0 || timeout < -1)