summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2017-07-16 09:25:28 +0300
committerGordon Ross <gwr@nexenta.com>2018-03-25 14:16:17 -0400
commitb2cf51950f94dd7f59fa3a283f96a19a31858b25 (patch)
tree6390914fae93e72a490bf958abc3b4daf348ef91
parente8f5b7dfac8c9ba83bf59912c6255d201326726f (diff)
downloadillumos-joyent-b2cf51950f94dd7f59fa3a283f96a19a31858b25.tar.gz
9303 chat: this statement may fall through
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Reviewed by: Jason King <jason.brian.king@gmail.com> Approved by: Gordon Ross <gwr@nexenta.com>
-rw-r--r--usr/src/cmd/cmd-inet/usr.bin/chat/chat.c8
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);
}
}