提交 8091b895 编写于 作者: F Fabian Frederick 提交者: Linus Torvalds

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

Remove obsolete simple_strtoul in ncp_getopt
Signed-off-by: NFabian Frederick <fabf@skynet.be>
Cc: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 647f010b
......@@ -53,15 +53,14 @@ int ncp_getopt(const char *caller, char **options, const struct ncp_option *opts
return -EINVAL;
}
if (opts->has_arg & OPT_INT) {
char* v;
int rc = kstrtoul(val, 0, value);
*value = simple_strtoul(val, &v, 0);
if (!*v) {
return opts->val;
if (rc) {
pr_info("%s: invalid numeric value in %s=%s\n",
caller, token, val);
return rc;
}
pr_info("%s: invalid numeric value in %s=%s\n",
caller, token, val);
return -EDOM;
return opts->val;
}
if (opts->has_arg & OPT_STRING) {
return opts->val;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册