提交 4f9d5f4a 编写于 作者: H Hoang-Nam Nguyen 提交者: Linus Torvalds

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: NHoang-Nam Nguyen <hnguyen@de.ibm.com>
Cc: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8ca3ed87
......@@ -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); \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册