This was doing a plain "return".
Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Signed-off-by: Erik Skultety <eskultet@redhat.com>
virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
{
virCommandPtr cmd = NULL;
- int ret = -1;
int exitstatus;
*master = NULL;
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to run command to get OVS master for "
"interface %s"), ifname);
- goto cleanup;
+ return -1;
}
/* non-0 exit code just means that the interface has no master in OVS */
VIR_DEBUG("OVS master for %s is %s", ifname, *master ? *master : "(none)");
- ret = 0;
- cleanup:
- return ret;
+ return 0;
}