aboutsummaryrefslogtreecommitdiff
path: root/coreutils/expr.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-03-23 11:13:23 +0000
committerRon Yorston <rmy@pobox.com>2012-03-23 11:13:23 +0000
commit40514a0309939f2446f0d4ed9600cad5de396e7f (patch)
tree0f5f4a57d4bb7893418b5bb11d482858eb17ba8b /coreutils/expr.c
parent9db164d6e39050d09f38288c6045cd2a2cbf6d63 (diff)
parentc0cae52662ccced9df19f19ec94238d1b1e3bd71 (diff)
downloadbusybox-w32-40514a0309939f2446f0d4ed9600cad5de396e7f.tar.gz
busybox-w32-40514a0309939f2446f0d4ed9600cad5de396e7f.tar.bz2
busybox-w32-40514a0309939f2446f0d4ed9600cad5de396e7f.zip
Merge commit 'c0cae52662ccced9df19f19ec94238d1b1e3bd71' into merge
Conflicts: Makefile.flags scripts/basic/fixdep.c
Diffstat (limited to 'coreutils/expr.c')
-rw-r--r--coreutils/expr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 24e75b556..c986f9327 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -100,6 +100,7 @@ struct globals {
100 char **args; 100 char **args;
101} FIX_ALIASING; 101} FIX_ALIASING;
102#define G (*(struct globals*)&bb_common_bufsiz1) 102#define G (*(struct globals*)&bb_common_bufsiz1)
103#define INIT_G() do { } while (0)
103 104
104/* forward declarations */ 105/* forward declarations */
105static VALUE *eval(void); 106static VALUE *eval(void);
@@ -519,6 +520,8 @@ int expr_main(int argc UNUSED_PARAM, char **argv)
519{ 520{
520 VALUE *v; 521 VALUE *v;
521 522
523 INIT_G();
524
522 xfunc_error_retval = 2; /* coreutils compat */ 525 xfunc_error_retval = 2; /* coreutils compat */
523 G.args = argv + 1; 526 G.args = argv + 1;
524 if (*G.args == NULL) { 527 if (*G.args == NULL) {