diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-06 11:10:11 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-06 11:10:11 +0100 |
commit | a6f84e1a35b5d9d15bfb976f76bb5dc340bc995c (patch) | |
tree | cb42e864d6c44a205662e3bc531516f9d522850d /miscutils | |
parent | 95f93bdc280f93b6f1c30c64bf10a8be38669578 (diff) | |
download | busybox-w32-a6f84e1a35b5d9d15bfb976f76bb5dc340bc995c.tar.gz busybox-w32-a6f84e1a35b5d9d15bfb976f76bb5dc340bc995c.tar.bz2 busybox-w32-a6f84e1a35b5d9d15bfb976f76bb5dc340bc995c.zip |
bc: reuse common string
text data bss dec hex filename
987232 485 7296 995013 f2ec5 busybox_old
987205 485 7296 994986 f2eaa busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/bc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c index dc4fa37a4..71945ff4a 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
@@ -986,9 +986,9 @@ static int bc_error(const char *msg) | |||
986 | { | 986 | { |
987 | return bc_error_fmt("%s", msg); | 987 | return bc_error_fmt("%s", msg); |
988 | } | 988 | } |
989 | static int bc_posix_error(const char *msg) | 989 | static int bc_POSIX_requires(const char *msg) |
990 | { | 990 | { |
991 | return bc_posix_error_fmt("%s", msg); | 991 | return bc_posix_error_fmt("POSIX requires %s", msg); |
992 | } | 992 | } |
993 | static int bc_POSIX_does_not_allow(const char *msg) | 993 | static int bc_POSIX_does_not_allow(const char *msg) |
994 | { | 994 | { |
@@ -4047,7 +4047,7 @@ static BcStatus bc_parse_return(BcParse *p) | |||
4047 | if (s) return s; | 4047 | if (s) return s; |
4048 | 4048 | ||
4049 | if (!paren || p->l.t.last != BC_LEX_RPAREN) { | 4049 | if (!paren || p->l.t.last != BC_LEX_RPAREN) { |
4050 | s = bc_posix_error("POSIX requires parentheses around return expressions"); | 4050 | s = bc_POSIX_requires("parentheses around return expressions"); |
4051 | if (s) return s; | 4051 | if (s) return s; |
4052 | } | 4052 | } |
4053 | 4053 | ||
@@ -4416,7 +4416,7 @@ static BcStatus bc_parse_func(BcParse *p) | |||
4416 | if (s) return s; | 4416 | if (s) return s; |
4417 | 4417 | ||
4418 | if (p->l.t.t != BC_LEX_LBRACE) | 4418 | if (p->l.t.t != BC_LEX_LBRACE) |
4419 | s = bc_posix_error("POSIX requires the left brace be on the same line as the function header"); | 4419 | s = bc_POSIX_requires("the left brace be on the same line as the function header"); |
4420 | 4420 | ||
4421 | return s; | 4421 | return s; |
4422 | 4422 | ||
@@ -4944,7 +4944,7 @@ static BcStatus bc_parse_expr_empty_ok(BcParse *p, uint8_t flags, BcParseNext ne | |||
4944 | if (s) return s; | 4944 | if (s) return s; |
4945 | } | 4945 | } |
4946 | else if ((flags & BC_PARSE_REL) && nrelops > 1) { | 4946 | else if ((flags & BC_PARSE_REL) && nrelops > 1) { |
4947 | s = bc_posix_error("POSIX requires exactly one comparison operator per condition"); | 4947 | s = bc_POSIX_requires("exactly one comparison operator per condition"); |
4948 | if (s) return s; | 4948 | if (s) return s; |
4949 | } | 4949 | } |
4950 | 4950 | ||