diff options
| -rw-r--r-- | usr/src/cmd/cmd-inet/usr.bin/chat/chat.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/cmd/cmd-inet/usr.bin/chat/chat.c b/usr/src/cmd/cmd-inet/usr.bin/chat/chat.c index 6954ed7a25..bed933f162 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/chat/chat.c +++ b/usr/src/cmd/cmd-inet/usr.bin/chat/chat.c @@ -1206,6 +1206,7 @@ int get_char() default: logf("warning: read() on stdin returned %d", status); + /* FALLTHROUGH */ case -1: if ((status = fcntl(0, F_GETFL, 0)) == -1) @@ -1231,17 +1232,18 @@ int c; switch (status) { case 1: return (0); - + default: logf("warning: write() on stdout returned %d", status); - + /* FALLTHROUGH */ + case -1: if ((status = fcntl(0, F_GETFL, 0)) == -1) fatal(2, "Can't get file mode flags on stdin, %m"); if (fcntl(0, F_SETFL, status & ~O_NONBLOCK) == -1) fatal(2, "Can't set file mode flags on stdin: %m"); - + return (-1); } } |
