From: Blue Swirl Date: Sat, 20 Feb 2010 08:20:18 +0000 (+0000) Subject: Fix warning on OpenBSD X-Git-Tag: xen-15-06-02~8510 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=64e69d50a394a48de7607f178d53c192443f9066;p=people%2Fsstabellini%2Fqemu-dm.git%2F.git Fix warning on OpenBSD /src/qemu/net.c: In function `net_check_clients': /src/qemu/net.c:1287: warning: `has_nic' might be used uninitialized in this function /src/qemu/net.c:1287: warning: `has_host_dev' might be used uninitialized in this function Signed-off-by: Blue Swirl --- diff --git a/net.c b/net.c index 029b0d79bd..88934dfff2 100644 --- a/net.c +++ b/net.c @@ -1284,7 +1284,7 @@ void net_check_clients(void) { VLANState *vlan; VLANClientState *vc; - int has_nic, has_host_dev; + int has_nic = 0, has_host_dev = 0; QTAILQ_FOREACH(vlan, &vlans, next) { QTAILQ_FOREACH(vc, &vlan->clients, next) {