Implement suggestion from Adam Slattery, (don't default to killing closing bug #1190.
[oweals/busybox.git] / expr.c
diff --git a/expr.c b/expr.c
index 8ef5293c1d86771fd503ebb15a38964db00af984..d6cc82e3ee5cae81419ded7334fe66ed535a5314 100644 (file)
--- a/expr.c
+++ b/expr.c
  * One function can handle multiple operators all of equal precedence,
  * provided they all associate ((x op x) op x). */
 
-#include "busybox.h"
+/* no getopt needed */
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <regex.h>
 #include <sys/types.h>
+#include "busybox.h"
 
 
 /* The kinds of value we can have.  */
@@ -87,8 +89,8 @@ int expr_main (int argc, char **argv)
 
        if (v->type == integer)
                printf ("%d\n", v->u.i);
-       else 
-               printf ("%s\n", v->u.s);
+       else
+               puts (v->u.s);
 
        exit (null (v));
 }
@@ -223,7 +225,7 @@ int name (l, r) VALUE *l; VALUE *r;         \
 }
 
 #define arithdivf(name, op)                    \
-int name (l, r) VALUE *l; VALUE *r;            \
+static int name (l, r) VALUE *l; VALUE *r;             \
 {                                              \
   if (!toarith (l) || !toarith (r))            \
     error_msg_and_die ( "non-numeric argument");       \