]> git.proxmox.com Git - qemu.git/commitdiff
Fix warning on OpenBSD
authorBlue Swirl <blauwirbel@gmail.com>
Sat, 20 Feb 2010 08:20:18 +0000 (08:20 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 20 Feb 2010 08:20:18 +0000 (08:20 +0000)
/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 <blauwirbel@gmail.com>
net.c

diff --git a/net.c b/net.c
index 029b0d79bda4ed699780d8d0e1d02e325f37b0c7..88934dfff2014721d3beae625021cddb9a3eee23 100644 (file)
--- 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) {