]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: eliminate unnecessary labels
authorLaine Stump <laine@redhat.com>
Sat, 4 Jul 2020 03:51:27 +0000 (23:51 -0400)
committerLaine Stump <laine@redhat.com>
Mon, 20 Jul 2020 23:11:35 +0000 (19:11 -0400)
commitf931c85fb03a184c6956a4203c840d0d1031c072
tree3d92505ccd284ed48a03949b0e19b8f1c6e2be82
parentb32b2746add614e1fd240b1e0fc1e31b6270c73d
network: eliminate unnecessary labels

All these cleanup/error labels were reduced to having just "return
ret" by a previous patch, so get rid of them and return directly.

This patch coincidentally fixes a bug in
networkFindUnusedBridgeName(), where we would log an error yet still
return success if we failed to find a single unused "virbrNNN" name
after checking all values of "N" from 0 - 256. Said bug was introduced
when that function was originally written, in commit a28d3e485f
(libvirt 1.2.15, 2015)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/network/bridge_driver.c
src/network/bridge_driver_linux.c