Skip to contentSkip to conversation

lib/vsprintf.c: Fix bug omitting minus sign of numbers (module_param)

PATCH New Hoang-Nam Nguyen 1 participant 1 message Feb 21, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/vsprintf.c: Fix bug omitting minus sign of numbers (module_param)

lib/vsprintf.c: Fix bug omitting minus sign of numbers (module_param)

This exists in 2.6.25 only.

---
 lib/vsprintf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/vsprintf.c +1 -1
index fd987b1..6021757 100644
@@ -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);		\
Signature · 1 line
1.5.2