projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
647f010
)
fs/ncpfs/getopt.c: replace simple_strtoul by kstrtoul
author
Fabian Frederick
<
[email protected]
>
Wed, 4 Jun 2014 23:12:21 +0000
(16:12 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 4 Jun 2014 23:54:21 +0000
(16:54 -0700)
Remove obsolete simple_strtoul in ncp_getopt
Signed-off-by: Fabian Frederick <
[email protected]
>
Cc: Petr Vandrovec <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/ncpfs/getopt.c
patch
|
blob
|
history
diff --git
a/fs/ncpfs/getopt.c
b/fs/ncpfs/getopt.c
index 03ffde1f44d699764ad7e956c8cbe60fc8428dd2..344889cd120ed156671d2c9d745c07802bae0c5f 100644
(file)
--- a/
fs/ncpfs/getopt.c
+++ b/
fs/ncpfs/getopt.c
@@
-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;