fs/ncpfs/getopt.c: replace simple_strtoul by kstrtoul

Remove obsolete simple_strtoul in ncp_getopt

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Fabian Frederick
2014-06-04 16:12:21 -07:00
committed by Linus Torvalds
parent 647f010bff
commit 8091b895b7

View File

@@ -53,15 +53,14 @@ int ncp_getopt(const char *caller, char **options, const struct ncp_option *opts
return -EINVAL; return -EINVAL;
} }
if (opts->has_arg & OPT_INT) { if (opts->has_arg & OPT_INT) {
char* v; int rc = kstrtoul(val, 0, value);
*value = simple_strtoul(val, &v, 0); if (rc) {
if (!*v) { pr_info("%s: invalid numeric value in %s=%s\n",
return opts->val; caller, token, val);
return rc;
} }
pr_info("%s: invalid numeric value in %s=%s\n", return opts->val;
caller, token, val);
return -EDOM;
} }
if (opts->has_arg & OPT_STRING) { if (opts->has_arg & OPT_STRING) {
return opts->val; return opts->val;