mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Remove useless condition in networkRadvdConfContents
If v6present is false, this code is not reachable. Also, there is no need to check for errors twice.
This commit is contained in:
parent
a1228523ed
commit
0979aaf846
@ -1535,19 +1535,14 @@ networkRadvdConfContents(virNetworkObjPtr network, char **configstr)
|
|||||||
VIR_FREE(netaddr);
|
VIR_FREE(netaddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* only create the string if we found at least one IPv6 address */
|
|
||||||
if (v6present) {
|
|
||||||
virBufferAddLit(&configbuf, "};\n");
|
virBufferAddLit(&configbuf, "};\n");
|
||||||
|
|
||||||
if (virBufferError(&configbuf)) {
|
if (virBufferError(&configbuf)) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (!(*configstr = virBufferContentAndReset(&configbuf))) {
|
|
||||||
virReportOOMError();
|
*configstr = virBufferContentAndReset(&configbuf);
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user