WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] uninitialised variable in xcs
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
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] uninitialised variable in xcs, Rik van Riel <=