diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-01-04 03:43:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-01-04 03:43:42 -0500 |
commit | bc030d6cb9532877c1c5a3f5e7123344fa24a285 (patch) | |
tree | d223d410b868b80d4c0deec192d354a5d06b201a /lib/parser.c | |
parent | d3bd058826aa8b79590cca6c8e6d1557bf576ada (diff) | |
parent | 387c31c7e5c9805b0aef8833d1731a5fe7bdea14 (diff) |
Merge commit 'v2.6.37-rc8' into x86/apic
Conflicts:
arch/x86/include/asm/io_apic.h
Merge reason: move to a fresh -rc, resolve the conflict.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib/parser.c')
-rw-r--r-- | lib/parser.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/parser.c b/lib/parser.c index fb34977246bb..6e89eca5cca0 100644 --- a/lib/parser.c +++ b/lib/parser.c | |||
@@ -128,12 +128,13 @@ static int match_number(substring_t *s, int *result, int base) | |||
128 | char *endp; | 128 | char *endp; |
129 | char *buf; | 129 | char *buf; |
130 | int ret; | 130 | int ret; |
131 | size_t len = s->to - s->from; | ||
131 | 132 | ||
132 | buf = kmalloc(s->to - s->from + 1, GFP_KERNEL); | 133 | buf = kmalloc(len + 1, GFP_KERNEL); |
133 | if (!buf) | 134 | if (!buf) |
134 | return -ENOMEM; | 135 | return -ENOMEM; |
135 | memcpy(buf, s->from, s->to - s->from); | 136 | memcpy(buf, s->from, len); |
136 | buf[s->to - s->from] = '\0'; | 137 | buf[len] = '\0'; |
137 | *result = simple_strtol(buf, &endp, base); | 138 | *result = simple_strtol(buf, &endp, base); |
138 | ret = 0; | 139 | ret = 0; |
139 | if (endp == buf) | 140 | if (endp == buf) |