diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-02-17 12:27:37 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-02-17 12:28:05 -0500 |
commit | b7e56edba4b02f2079042c326a8cd72a44635817 (patch) | |
tree | b5042002e9747cd8fb1278d61f86d8b92a74c018 /lib/parser.c | |
parent | 13ca0fcaa33f6b1984c4111b6ec5df42689fea6f (diff) | |
parent | b0483e78e5c4c9871fc5541875b3bc006846d46b (diff) |
Merge branch 'linus' into x86/mm
x86/mm is on 32-rc4 and missing the spinlock namespace changes which
are needed for further commits into this topic.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'lib/parser.c')
-rw-r--r-- | lib/parser.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/parser.c b/lib/parser.c index b00d02059a5f..fb34977246bb 100644 --- a/lib/parser.c +++ b/lib/parser.c | |||
@@ -56,13 +56,16 @@ static int match_one(char *s, const char *p, substring_t args[]) | |||
56 | 56 | ||
57 | args[argc].from = s; | 57 | args[argc].from = s; |
58 | switch (*p++) { | 58 | switch (*p++) { |
59 | case 's': | 59 | case 's': { |
60 | if (strlen(s) == 0) | 60 | size_t str_len = strlen(s); |
61 | |||
62 | if (str_len == 0) | ||
61 | return 0; | 63 | return 0; |
62 | else if (len == -1 || len > strlen(s)) | 64 | if (len == -1 || len > str_len) |
63 | len = strlen(s); | 65 | len = str_len; |
64 | args[argc].to = s + len; | 66 | args[argc].to = s + len; |
65 | break; | 67 | break; |
68 | } | ||
66 | case 'd': | 69 | case 'd': |
67 | simple_strtol(s, &args[argc].to, 0); | 70 | simple_strtol(s, &args[argc].to, 0); |
68 | goto num; | 71 | goto num; |