summaryrefslogtreecommitdiff
path: root/coreutils/stty.c
diff options
context:
space:
mode:
authorDenys Vlasenko2011-10-21 19:45:13 +0200
committerDenys Vlasenko2011-10-21 19:45:13 +0200
commit5dd1f472a41f2c3dd3c009d0e623212514205c2c (patch)
tree5c6bcf701546b8fcf430ea440ea7d8fe9b02779a /coreutils/stty.c
parent17fb598dc2fa094d6bbf56bbc9f6e561f4fb3679 (diff)
downloadbusybox-5dd1f472a41f2c3dd3c009d0e623212514205c2c.zip
busybox-5dd1f472a41f2c3dd3c009d0e623212514205c2c.tar.gz
stty: trim too verbose error messages (-40 bytes)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/stty.c')
-rw-r--r--coreutils/stty.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/coreutils/stty.c b/coreutils/stty.c
index 7f057ea..0668cf7 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -1404,13 +1404,15 @@ int stty_main(int argc UNUSED_PARAM, char **argv)
/* Specifying both -a and -g is an error */
if ((stty_state & (STTY_verbose_output | STTY_recoverable_output)) ==
- (STTY_verbose_output | STTY_recoverable_output))
- bb_error_msg_and_die("verbose and stty-readable output styles are mutually exclusive");
+ (STTY_verbose_output | STTY_recoverable_output)
+ ) {
+ bb_error_msg_and_die("-a and -g are mutually exclusive");
+ }
/* Specifying -a or -g with non-options is an error */
- if (!(stty_state & STTY_noargs)
- && (stty_state & (STTY_verbose_output | STTY_recoverable_output))
+ if ((stty_state & (STTY_verbose_output | STTY_recoverable_output))
+ && !(stty_state & STTY_noargs)
) {
- bb_error_msg_and_die("modes may not be set when specifying an output style");
+ bb_error_msg_and_die("modes may not be set when -a or -g is used");
}
/* Now it is safe to start doing things */