virNetDevSetVfMac: Fix error message on invalid args

If virNetDevSetVfMac() is called with either @macaddr or
@allowRetry arguments NULL an error is reported, because this is
considered invalid use. However, the error message is not
informative as it could be.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2022-04-22 14:15:46 +02:00
parent 0236e6154c
commit 7899a11523

View File

@ -1642,7 +1642,9 @@ virNetDevSetVfMac(const char *ifname, int vf,
};
if (macaddr == NULL || allowRetry == NULL) {
virReportError(EINVAL, "%s", _("Invalid parameters: %d"));
virReportError(EINVAL,
_("Invalid parameters macaddr=%p allowRetry=%p"),
macaddr, allowRetry);
return -EINVAL;
}