]> diplodocus.org Git - nmh/commitdiff
read_switch_multiword.c: Flip if-condition so return moves from else block.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 9 Sep 2017 17:20:09 +0000 (18:20 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sat, 9 Sep 2017 17:24:01 +0000 (18:24 +0100)
Then no need for else block after return.

sbr/read_switch_multiword.c

index 67c5f33..a5aedae 100644 (file)
@@ -25,12 +25,11 @@ read_switch_multiword (const char *prompt, const struct swit *ansp)
     SIGNAL_HANDLER istat = NULL;
     char *cp, **cpp;
 
     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;
     }
        SIGNAL (SIGINT, istat);
        return NULL;
     }
+    istat = SIGNAL (SIGINT, intrser);
 
     for (;;) {
        fputs(prompt, stdout);
 
     for (;;) {
        fputs(prompt, stdout);