diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 49709488b1..a25b7ba969 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -4207,12 +4207,9 @@ vshWatchJob(vshControl *ctl, if (ret > 0) { if (pollfd[1].revents & POLLIN && saferead(STDIN_FILENO, &retchar, sizeof(retchar)) > 0) { - if (vshTTYIsInterruptCharacter(ctl, retchar)) { + if (vshTTYIsInterruptCharacter(ctl, retchar)) virDomainAbortJob(dom); - goto cleanup; - } else { - continue; - } + continue; } if (pollfd[0].revents & POLLIN && @@ -4232,9 +4229,8 @@ vshWatchJob(vshControl *ctl, if (intCaught) { virDomainAbortJob(dom); intCaught = 0; - } else { - continue; } + continue; } goto cleanup; }