X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fparser.c;h=703c8c13b346c39c460d0dbe02e6f32af019d71b;hb=54936f8b099325992f0f212a5e366fd5257c6c9c;hp=7ad2a48abc5e2116908b0a45d58df2d5dc7aa8f5;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=linux-2.6-omap-h63xx.git diff --git a/lib/parser.c b/lib/parser.c index 7ad2a48abc5..703c8c13b34 100644 --- a/lib/parser.c +++ b/lib/parser.c @@ -22,7 +22,7 @@ * match extremely simple token=arg style patterns. If the pattern is found, * the location(s) of the arguments will be returned in the @args array. */ -static int match_one(char *s, char *p, substring_t args[]) +static int match_one(char *s, const char *p, substring_t args[]) { char *meta; int argc = 0; @@ -43,7 +43,7 @@ static int match_one(char *s, char *p, substring_t args[]) p = meta + 1; if (isdigit(*p)) - len = simple_strtoul(p, &p, 10); + len = simple_strtoul(p, (char **) &p, 10); else if (*p == '%') { if (*s++ != '%') return 0; @@ -102,7 +102,7 @@ static int match_one(char *s, char *p, substring_t args[]) */ int match_token(char *s, match_table_t table, substring_t args[]) { - struct match_token *p; + const struct match_token *p; for (p = table; !match_one(s, p->pattern, args) ; p++) ; @@ -190,7 +190,7 @@ int match_hex(substring_t *s, int *result) * &substring_t @s to the c-style string @to. Caller guarantees that @to is * large enough to hold the characters of @s. */ -void match_strcpy(char *to, substring_t *s) +void match_strcpy(char *to, const substring_t *s) { memcpy(to, s->from, s->to - s->from); to[s->to - s->from] = '\0'; @@ -204,7 +204,7 @@ void match_strcpy(char *to, substring_t *s) * the &substring_t @s. The caller is responsible for freeing the returned * string with kfree(). */ -char *match_strdup(substring_t *s) +char *match_strdup(const substring_t *s) { char *p = kmalloc(s->to - s->from + 1, GFP_KERNEL); if (p)