skip_whitespace() shouldn't claim its return value is const, it doesn't know

that and callers wind up typecasting it back.
This commit is contained in:
Rob Landley
2006-06-18 20:20:07 +00:00
parent 14d7065ef1
commit ea224be6aa
12 changed files with 65 additions and 193 deletions

View File

@@ -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;