]> git.marmaro.de Git - mmh/blobdiff - uip/whatnow.c
simplify whatnow.c/main() function
[mmh] / uip / whatnow.c
index 65d2fb021c5f176e632a0e0bf4b8d4fa169e113f..45671ed365f5e6b6a3b11b6c3fd4ab76e9bb9f8d 100644 (file)
@@ -173,10 +173,7 @@ main(int argc, char **argv)
        }
 
        snprintf(prompt, sizeof(prompt), myprompt, invo_name);
-       for (;;) {
-               if (!(argp = getans(prompt, aleqs))) {
-                       exit(EX_IOERR);
-               }
+       while ((argp = getans(prompt, aleqs))) {
                switch (smatch(*argp, aleqs)) {
                case DISPSW:
                        /* display the msg being replied to or distributed */
@@ -381,7 +378,8 @@ main(int argc, char **argv)
                        break;
                }
        }
-       /*NOTREACHED*/
+
+       exit(EX_IOERR);
 }