mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh: report errors for empty strings
Several callers were using vshCommandOptString without setting an error. Use vshCommandOptStringReq which sets the error. https://bugzilla.redhat.com/show_bug.cgi?id=1281707
This commit is contained in:
@@ -2243,9 +2243,9 @@ cmdDomIfAddr(vshControl *ctl, const vshCmd *cmd)
|
||||
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
|
||||
return false;
|
||||
|
||||
if (vshCommandOptString(ctl, cmd, "interface", &ifacestr) < 0)
|
||||
if (vshCommandOptStringReq(ctl, cmd, "interface", &ifacestr) < 0)
|
||||
goto cleanup;
|
||||
if (vshCommandOptString(ctl, cmd, "source", &sourcestr) < 0)
|
||||
if (vshCommandOptStringReq(ctl, cmd, "source", &sourcestr) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (sourcestr) {
|
||||
|
||||
Reference in New Issue
Block a user