bc: disallow empty statement as function body
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 16 Dec 2018 19:46:15 +0000 (20:46 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 16 Dec 2018 19:46:15 +0000 (20:46 +0100)
commitcb18b546f7ee9d1c9315c7357ab620e55f0fa8f3
tree35f1cc57b6ec62af95b893c8379baac155cf0a7e
parent2e8be023cbd96c54256b5908837039100dc4fc45
bc: disallow empty statement as function body

$ bc
define z() <cr>
<cr>
bc: no statement after 'define'

function                                             old     new   delta
zbc_parse_stmt_possibly_auto                        2239    2245      +6
zbc_vm_process                                       589     594      +5
zbc_parse_stmt_fail_if_bare_NLINE                     25      28      +3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 14/0)               Total: 14 bytes
   text    data     bss     dec     hex filename
 982216     485    7296  989997   f1b2d busybox_old
 982237     485    7296  990018   f1b42 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/bc.c