forked from Minki/linux
lib/vsprintf.c: fix bug omitting minus sign of numbers (module_param)
lib/vsprintf.c: Fix bug omitting minus sign of numbers (module_param) Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Cc: Yi Yang <yi.y.yang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
8ca3ed87db
commit
4f9d5f4a35
@ -234,7 +234,7 @@ int strict_strto##type(const char *cp, unsigned int base, valtype *res) \
|
||||
int ret; \
|
||||
if (*cp == '-') { \
|
||||
ret = strict_strtou##type(cp+1, base, res); \
|
||||
if (ret != 0) \
|
||||
if (!ret) \
|
||||
*res = -(*res); \
|
||||
} else \
|
||||
ret = strict_strtou##type(cp, base, res); \
|
||||
|
Loading…
Reference in New Issue
Block a user