[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] uninitialised variable in xcs


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
  • From: Rik van Riel <riel@xxxxxxxxxx>
  • Date: Tue, 1 Mar 2005 14:05:32 -0500 (EST)
  • Delivery-date: Tue, 01 Mar 2005 19:39:17 +0000
  • List-id: List for Xen developers <xen-devel.lists.sourceforge.net>

The first use of the variable after its declaration is a comparison
and possibly an assignment of its own value to itself.  I suspect it
would be a good idea to initialise it.

        n = fd_max ( n, listen_fd );

Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>

--- xen-unstable/tools/xcs/xcs.c.n      2005-03-01 14:03:24.637202605 -0500
+++ xen-unstable/tools/xcs/xcs.c        2005-03-01 14:03:39.724737759 -0500
@@ -677,7 +677,7 @@
  
     for (;;)
     {
-        int n, ret;
+        int n = 0, ret;
         fd_set rd, wr, er;
         FD_ZERO ( &rd );
         FD_ZERO ( &wr );


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.