aboutsummaryrefslogtreecommitdiff
path: root/coreutils/test.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-06-18 20:20:07 +0000
committerRob Landley <rob@landley.net>2006-06-18 20:20:07 +0000
commitea224be6aa8fed5486376d3021a4cb911e935106 (patch)
tree38d6c5d2d53841e3f4e2702521e3b03235c51017 /coreutils/test.c
parent14d7065ef1eb836d20e13bc25d1b13f0e76185ac (diff)
downloadbusybox-ea224be6aa8fed5486376d3021a4cb911e935106.tar.gz
skip_whitespace() shouldn't claim its return value is const, it doesn't know
that and callers wind up typecasting it back.
Diffstat (limited to 'coreutils/test.c')
-rw-r--r--coreutils/test.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/coreutils/test.c b/coreutils/test.c
index 4d920380d..ab3793627 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -19,14 +19,12 @@
* "This program is in the Public Domain."
*/
-#include <sys/types.h>
+#include "busybox.h"
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
-#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
-#include "busybox.h"
/* test(1) accepts the following grammar:
oexpr ::= aexpr | aexpr "-o" oexpr ;
@@ -482,8 +480,7 @@ static arith_t getn(const char *s)
if (errno != 0)
syntax(s, "out of range");
- /* p = bb_skip_whitespace(p); avoid const warning */
- if (*(bb_skip_whitespace(p)))
+ if (*(skip_whitespace(p)))
syntax(s, "bad number");
return r;