]> xenbits.xensource.com Git - libvirt.git/commitdiff
Remove C99 variable declare in PHYP network driver
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 13 Apr 2011 18:10:52 +0000 (19:10 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 13 Apr 2011 18:15:22 +0000 (19:15 +0100)
Move the virInterfacePtr declaration to the top of the
function to avoid jump uninitialized variable warnings

* src/phyp/phyp_driver.c: Fix var declaration

src/phyp/phyp_driver.c

index b5145db8d371e7658db84a7b002796a9e1097419..a1b6819d1b2b7694cdb3c79fb788eab3eaac9a36 100644 (file)
@@ -3587,6 +3587,7 @@ phypInterfaceLookupByName(virConnectPtr conn, const char *name)
     int slot = 0;
     int lpar_id = 0;
     char mac[PHYP_MAC_SIZE];
+    virInterfacePtr result = NULL;
 
     /*Getting the slot number for the interface */
     virBufferAddLit(&buf, "lshwres ");
@@ -3667,7 +3668,7 @@ phypInterfaceLookupByName(virConnectPtr conn, const char *name)
 
     memcpy(mac, ret, PHYP_MAC_SIZE-1);
 
-    virInterfacePtr result = virGetInterface(conn, name, ret);
+    result = virGetInterface(conn, name, ret);
 
     VIR_FREE(cmd);
     VIR_FREE(ret);