aboutsummaryrefslogtreecommitdiff
path: root/coreutils/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/test.c')
-rw-r--r--coreutils/test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/coreutils/test.c b/coreutils/test.c
index 0bce66e6f..31ac87f34 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -452,10 +452,8 @@ static int getn(const char *s)
if (errno != 0)
bb_error_msg_and_die("%s: out of range", s);
- while (isspace(*p))
- p++;
-
- if (*p)
+ /* p = bb_skip_whitespace(p); avoid const warning */
+ if (*(bb_skip_whitespace(p)))
bb_error_msg_and_die("%s: bad number", s);
return (int) r;