lib/parser.c: switch match_u64int() over to use match_strdup()
PATCH 1/1 lib/parser.c: switch match_u64int() over to use match_strdup()
From: Eric Biggers <[email protected]>
This simplifies the code. No change in behavior.
Signed-off-by Eric Biggers <[email protected]>
--- lib/parser.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
lib/parser.c +1 -4
@@ -163,13 +163,10 @@ static int match_u64int(substring_t *s, u64 *result, int base)char *buf;int ret;u64 val; -size_t len = s->to - s->from; - buf =kmalloc (len +1 ,GFP_KERNEL ); + buf =match_strdup (s);if (!buf)return -ENOMEM ; -memcpy (buf, s->from, len); - buf[len] ='\0' ; ret =kstrtoull (buf, base, &val);if (!ret)
Signature · 1 line
2.19.0.rc0.228.g281dcd1b4d0-goog