From d4ca313d4340d0ef56a9e7ce564d94f3bc09e303 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sat, 9 Sep 2017 18:20:09 +0100 Subject: [PATCH] read_switch_multiword.c: Flip if-condition so return moves from else block. Then no need for else block after return. --- sbr/read_switch_multiword.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); -- 2.56.0