projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79587cb
)
bc: fix "bc -s" only warning on "define f()<newline>", not exiting
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 24 Dec 2018 17:28:56 +0000
(18:28 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 24 Dec 2018 17:28:56 +0000
(18:28 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/bc.c
patch
|
blob
|
history
diff --git
a/miscutils/bc.c
b/miscutils/bc.c
index 12bc80b3ee1c0122970338dd9f7da44f2f559041..35778ff1c8f30ac78c0ef35c34468f306e738887 100644
(file)
--- a/
miscutils/bc.c
+++ b/
miscutils/bc.c
@@
-4426,8
+4426,10
@@
static BC_STATUS zbc_parse_funcdef(BcParse *p)
s = zbc_lex_next(&p->l);
if (s) RETURN_STATUS(s);
- if (p->l.t.t != BC_LEX_LBRACE)
+ if (p->l.t.t != BC_LEX_LBRACE)
{
s = zbc_POSIX_requires("the left brace be on the same line as the function header");
+ if (s) RETURN_STATUS(s);
+ }
// Prevent "define z()<newline>" from being interpreted as function with empty stmt as body
s = zbc_lex_skip_if_at_NLINE(&p->l);