projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49f9381
)
simplify whatnow.c/main() function
author
Dmitry Bogatov
<KAction@gnu.org>
Thu, 14 Jul 2016 22:39:37 +0000
(
01:39
+0300)
committer
Philipp Takacs
<philipp@bureaucracy.de>
Tue, 19 Jul 2016 07:40:19 +0000
(09:40 +0200)
GNU Complexity: 60 -> 59.
uip/whatnow.c
patch
|
blob
|
history
diff --git
a/uip/whatnow.c
b/uip/whatnow.c
index
65d2fb0
..
45671ed
100644
(file)
--- a/
uip/whatnow.c
+++ b/
uip/whatnow.c
@@
-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);
}