diff options
author | Roland McGrath <roland@gnu.org> | 1992-10-19 23:32:31 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1992-10-19 23:32:31 +0000 |
commit | c7bb437152861499e13eb9061ba18feb6d4b2786 (patch) | |
tree | 0648ba449dde414eba87417bfab2ef14d3561c0e /manual/examples | |
parent | fdde6bbe2af46d51b65297a6880148ec1f6e48dd (diff) |
(main): Use puts for a constant rather than printf.
(do_command): Lose when fgets loses, not when it wins.
Diffstat (limited to 'manual/examples')
-rw-r--r-- | manual/examples/setjmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/manual/examples/setjmp.c b/manual/examples/setjmp.c index 5b5e7d8eda..023339c602 100644 --- a/manual/examples/setjmp.c +++ b/manual/examples/setjmp.c @@ -15,7 +15,7 @@ main (void) { while (1) if (setjmp (main_loop)) - printf ("Back at main loop....\n"); + puts ("Back at main loop...."); else do_command (); } @@ -25,7 +25,7 @@ void do_command (void) { char buffer[128]; - if (fgets (buffer, 128, stdin)) + if (fgets (buffer, 128, stdin) == NULL) abort_to_main_loop (-1); else exit (EXIT_SUCCESS); |