summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenys Vlasenko2018-12-22 14:18:47 +0100
committerDenys Vlasenko2018-12-22 14:18:47 +0100
commit7c1c9dc86bf7d7bc91e906473c0f81a666113402 (patch)
treed3b99710560bc5f73bcd5533ab38a62ff1c10998 /miscutils
parent88fcd5cc6c9b64daf200860a53783d03c8dfe225 (diff)
downloadbusybox-7c1c9dc86bf7d7bc91e906473c0f81a666113402.zip
busybox-7c1c9dc86bf7d7bc91e906473c0f81a666113402.tar.gz
bc: shorten sanity-check code
function old new delta zbc_vm_process 745 740 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/bc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index 29007d8..bb83e0a 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -6678,9 +6678,9 @@ static BC_STATUS zbc_vm_process(const char *text)
BcInstPtr *ip = (void*)G.prog.exestack.v;
#if SANITY_CHECKS
- if (G.prog.results.len != 0)
- bb_error_msg_and_die("data stack not empty: %d slots", G.prog.results.len);
- if (G.prog.exestack.len != 1) // should be empty
+ if (G.prog.results.len != 0) // should be empty
+ bb_error_msg_and_die("BUG:data stack");
+ if (G.prog.exestack.len != 1) // should have only main's IP
bb_error_msg_and_die("BUG:call stack");
if (ip->func != BC_PROG_MAIN)
bb_error_msg_and_die("BUG:not MAIN");