[PATCH 1/2] qsort: Fix wrong check
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: 2012-08-03 06:30:44
Subsystem:
library code, the rest · Maintainers:
Andrew Morton, Linus Torvalds
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: 2012-08-03 06:30:44
Subsystem:
library code, the rest · Maintainers:
Andrew Morton, Linus Torvalds
The check for overflow accidently was exactly the opposite. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- lib/qsort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/qsort.c b/lib/qsort.c
index f648714..d413096 100644
--- a/lib/qsort.c
+++ b/lib/qsort.c@@ -31,7 +31,7 @@ void qsort(void *base, return; /* check for overflow */ - if (nel <= ((size_t)(-1)) / width) + if (nel > ((size_t)(-1)) / width) return; wgap = 0;
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox