diff --git a/tools/virsh.c b/tools/virsh.c index 55deb4c2be..85014f2b5d 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -8602,7 +8602,7 @@ editFile (vshControl *ctl, const char *filename) VIR_FREE(command); return -1; } - if (command_ret != WEXITSTATUS (0)) { + if (WEXITSTATUS(command_ret) != 0) { vshError(ctl, _("%s: command exited with non-zero status"), command); VIR_FREE(command);