From: Ralph Corderoy Date: Sat, 9 Sep 2017 17:20:09 +0000 (+0100) Subject: read_switch_multiword.c: Flip if-condition so return moves from else block. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/d4ca313d4340d0ef56a9e7ce564d94f3bc09e303 read_switch_multiword.c: Flip if-condition so return moves from else block. Then no need for else block after return. --- diff --git a/sbr/read_switch_multiword.c b/sbr/read_switch_multiword.c index 67c5f33e..a5aedae3 100644 --- a/sbr/read_switch_multiword.c +++ b/sbr/read_switch_multiword.c @@ -25,12 +25,11 @@ read_switch_multiword (const char *prompt, const struct swit *ansp) SIGNAL_HANDLER istat = NULL; char *cp, **cpp; - if (!(sigsetjmp(sigenv, 1))) { - istat = SIGNAL (SIGINT, intrser); - } else { + if (sigsetjmp(sigenv, 1)) { SIGNAL (SIGINT, istat); return NULL; } + istat = SIGNAL (SIGINT, intrser); for (;;) { fputs(prompt, stdout);