diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 22:36:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-04 22:36:58 -0400 |
commit | 7e20ef030dde0e52dd5a57220ee82fa9facbea4e (patch) | |
tree | 5006db4f85a2d7be2777748aaff2966e79dddc6f /lib | |
parent | a3d52136ee8f7399859f9a0824470fd49b1d1a00 (diff) | |
parent | 07d939677166cc4f000c767196872a9becc2697b (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (49 commits)
[SCTP]: Set assoc_id correctly during INIT collision.
[SCTP]: Re-order SCTP initializations to avoid race with sctp_rcv()
[SCTP]: Fix the SO_REUSEADDR handling to be similar to TCP.
[SCTP]: Verify all destination ports in sctp_connectx.
[XFRM] SPD info TLV aggregation
[XFRM] SAD info TLV aggregationx
[AF_RXRPC]: Sort out MTU handling.
[AF_IUCV/IUCV] : Add missing section annotations
[AF_IUCV]: Implementation of a skb backlog queue
[NETLINK]: Remove bogus BUG_ON
[IPV6]: Some cleanups in include/net/ipv6.h
[TCP]: zero out rx_opt in tcp_disconnect()
[BNX2]: Fix TSO problem with small MSS.
[NET]: Rework dev_base via list_head (v3)
[TCP] Highspeed: Limited slow-start is nowadays in tcp_slow_start
[BNX2]: Update version and reldate.
[BNX2]: Print bus information for PCIE devices.
[BNX2]: Add 1-shot MSI handler for 5709.
[BNX2]: Restructure PHY event handling.
[BNX2]: Add indirect spinlock.
...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/parser.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/parser.c b/lib/parser.c index 7ad2a48abc5e..703c8c13b346 100644 --- a/lib/parser.c +++ b/lib/parser.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * match extremely simple token=arg style patterns. If the pattern is found, | 22 | * match extremely simple token=arg style patterns. If the pattern is found, |
23 | * the location(s) of the arguments will be returned in the @args array. | 23 | * the location(s) of the arguments will be returned in the @args array. |
24 | */ | 24 | */ |
25 | static int match_one(char *s, char *p, substring_t args[]) | 25 | static int match_one(char *s, const char *p, substring_t args[]) |
26 | { | 26 | { |
27 | char *meta; | 27 | char *meta; |
28 | int argc = 0; | 28 | int argc = 0; |
@@ -43,7 +43,7 @@ static int match_one(char *s, char *p, substring_t args[]) | |||
43 | p = meta + 1; | 43 | p = meta + 1; |
44 | 44 | ||
45 | if (isdigit(*p)) | 45 | if (isdigit(*p)) |
46 | len = simple_strtoul(p, &p, 10); | 46 | len = simple_strtoul(p, (char **) &p, 10); |
47 | else if (*p == '%') { | 47 | else if (*p == '%') { |
48 | if (*s++ != '%') | 48 | if (*s++ != '%') |
49 | return 0; | 49 | return 0; |
@@ -102,7 +102,7 @@ static int match_one(char *s, char *p, substring_t args[]) | |||
102 | */ | 102 | */ |
103 | int match_token(char *s, match_table_t table, substring_t args[]) | 103 | int match_token(char *s, match_table_t table, substring_t args[]) |
104 | { | 104 | { |
105 | struct match_token *p; | 105 | const struct match_token *p; |
106 | 106 | ||
107 | for (p = table; !match_one(s, p->pattern, args) ; p++) | 107 | for (p = table; !match_one(s, p->pattern, args) ; p++) |
108 | ; | 108 | ; |
@@ -190,7 +190,7 @@ int match_hex(substring_t *s, int *result) | |||
190 | * &substring_t @s to the c-style string @to. Caller guarantees that @to is | 190 | * &substring_t @s to the c-style string @to. Caller guarantees that @to is |
191 | * large enough to hold the characters of @s. | 191 | * large enough to hold the characters of @s. |
192 | */ | 192 | */ |
193 | void match_strcpy(char *to, substring_t *s) | 193 | void match_strcpy(char *to, const substring_t *s) |
194 | { | 194 | { |
195 | memcpy(to, s->from, s->to - s->from); | 195 | memcpy(to, s->from, s->to - s->from); |
196 | to[s->to - s->from] = '\0'; | 196 | to[s->to - s->from] = '\0'; |
@@ -204,7 +204,7 @@ void match_strcpy(char *to, substring_t *s) | |||
204 | * the &substring_t @s. The caller is responsible for freeing the returned | 204 | * the &substring_t @s. The caller is responsible for freeing the returned |
205 | * string with kfree(). | 205 | * string with kfree(). |
206 | */ | 206 | */ |
207 | char *match_strdup(substring_t *s) | 207 | char *match_strdup(const substring_t *s) |
208 | { | 208 | { |
209 | char *p = kmalloc(s->to - s->from + 1, GFP_KERNEL); | 209 | char *p = kmalloc(s->to - s->from + 1, GFP_KERNEL); |
210 | if (p) | 210 | if (p) |