1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

network: eliminate unnecessary labels

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Laine Stump 2020-07-02 23:21:05 -04:00
parent 5cd1b25bd2
commit 8d591eb167

View File

@ -1842,7 +1842,6 @@ networkRadvdConfContents(virNetworkObjPtr obj,
{
virNetworkDefPtr def = virNetworkObjGetDef(obj);
g_auto(virBuffer) configbuf = VIR_BUFFER_INITIALIZER;
int ret = -1;
size_t i;
virNetworkIPDefPtr ipdef;
bool v6present = false, dhcp6 = false;
@ -1859,10 +1858,8 @@ networkRadvdConfContents(virNetworkObjPtr obj,
}
/* If there are no IPv6 addresses, then we are done */
if (!v6present) {
ret = 0;
goto cleanup;
}
if (!v6present)
return 0;
/* create radvd config file appropriate for this network;
* IgnoreIfMissing allows radvd to start even when the bridge is down
@ -1887,10 +1884,11 @@ networkRadvdConfContents(virNetworkObjPtr obj,
virReportError(VIR_ERR_INTERNAL_ERROR,
_("bridge '%s' has an invalid prefix"),
def->bridge);
goto cleanup;
return -1;
}
if (!(netaddr = virSocketAddrFormat(&ipdef->address)))
goto cleanup;
return -1;
virBufferAsprintf(&configbuf,
" prefix %s/%d\n"
" {\n%s };\n",
@ -1903,9 +1901,7 @@ networkRadvdConfContents(virNetworkObjPtr obj,
*configstr = virBufferContentAndReset(&configbuf);
ret = 0;
cleanup:
return ret;
return 0;
}