Use a 'binary' variable to hold it. Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- src/util/virnodesuspend.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c index af0ed615e1..62e62bb171 100644 --- a/src/util/virnodesuspend.c +++ b/src/util/virnodesuspend.c @@ -239,22 +239,23 @@ static int virNodeSuspendSupportsTargetPMUtils(unsigned int target, bool *supported) { VIR_AUTOPTR(virCommand) cmd = NULL; + const char *binary = "pm-is-supported"; int status; *supported = false; switch (target) { case VIR_NODE_SUSPEND_TARGET_MEM: - cmd = virCommandNewArgList("pm-is-supported", "--suspend", NULL); + cmd = virCommandNewArgList(binary, "--suspend", NULL); break; case VIR_NODE_SUSPEND_TARGET_DISK: - cmd = virCommandNewArgList("pm-is-supported", "--hibernate", NULL); + cmd = virCommandNewArgList(binary, "--hibernate", NULL); break; case VIR_NODE_SUSPEND_TARGET_HYBRID: - cmd = virCommandNewArgList("pm-is-supported", "--suspend-hybrid", NULL); + cmd = virCommandNewArgList(binary, "--suspend-hybrid", NULL); break; default: - return ret; + return -1; } if (virCommandRun(cmd, &status) < 0) -- 2.19.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list