提交 4bfab4a0 编写于 作者: D Daniel P. Berrange

Remove C99 variable declare in PHYP network driver

Move the virInterfacePtr declaration to the top of the
function to avoid jump uninitialized variable warnings

* src/phyp/phyp_driver.c: Fix var declaration
上级 d93ef446
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册