mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
nodedev: remove unnecessary checks for NULL cmd
virCommandRun() already handles the case where the cmd argument is NULL, so there's no need for the caller to check. Make all callers consistent and remove unnecessary NULL checks. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2d847765d2
commit
68580a5176
@ -799,9 +799,6 @@ virMdevctlCreate(virNodeDeviceDef *def, char **uuid, char **errmsg)
|
||||
MDEVCTL_CMD_CREATE,
|
||||
uuid,
|
||||
errmsg);
|
||||
if (!cmd)
|
||||
return -1;
|
||||
|
||||
/* an auto-generated uuid is returned via stdout if no uuid is specified in
|
||||
* the mdevctl args */
|
||||
if (virCommandRun(cmd, &status) < 0 || status != 0)
|
||||
@ -822,9 +819,6 @@ virMdevctlDefine(virNodeDeviceDef *def, char **uuid, char **errmsg)
|
||||
MDEVCTL_CMD_DEFINE,
|
||||
uuid, errmsg);
|
||||
|
||||
if (!cmd)
|
||||
return -1;
|
||||
|
||||
/* an auto-generated uuid is returned via stdout if no uuid is specified in
|
||||
* the mdevctl args */
|
||||
if (virCommandRun(cmd, &status) < 0 || status != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user