dhcp = virXPathNode("./dhcp", ctxt);
if (dhcp != NULL) {
- ret = virInterfaceDefParseDhcp(def, dhcp, ctxt);
- if (ret != 0)
- return ret;
+ if (virInterfaceDefParseDhcp(def, dhcp, ctxt) < 0)
+ return -1;
}
nIpNodes = virXPathNodeSet("./ip", ctxt, &ipNodes);
goto error;
ctxt->node = ipNodes[i];
- ret = virInterfaceDefParseIp(ip, ctxt);
- if (ret != 0) {
+ if (virInterfaceDefParseIp(ip, ctxt) < 0) {
virInterfaceIpDefFree(ip);
goto error;
}
dhcp = virXPathNode("./dhcp", ctxt);
if (dhcp != NULL) {
- ret = virInterfaceDefParseDhcp(def, dhcp, ctxt);
- if (ret != 0)
- return ret;
+ if (virInterfaceDefParseDhcp(def, dhcp, ctxt) < 0)
+ return -1;
}
nIpNodes = virXPathNodeSet("./ip", ctxt, &ipNodes);
goto error;
ctxt->node = ipNodes[i];
- ret = virInterfaceDefParseIp(ip, ctxt);
- if (ret != 0) {
+ if (virInterfaceDefParseIp(ip, ctxt) < 0) {
virInterfaceIpDefFree(ip);
goto error;
}