summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-08-03 08:27:49 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-08-03 08:28:18 +0200
commit3af8c180cb5f8bbc1de0010b81871e735e0afa60 (patch)
tree35ffe2d7f5d3a53c9028680640973b79efa71fd3
parent6efca01b82a59f32b016f9cfd46b12e8e632ee92 (diff)
downloadbarebox-3af8c180cb5f8bbc1de0010b81871e735e0afa60.tar.gz
barebox-3af8c180cb5f8bbc1de0010b81871e735e0afa60.tar.xz
qsort: Fix wrong check
The check for overflow accidently was exactly the opposite. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--lib/qsort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/qsort.c b/lib/qsort.c
index f64871489d..d413096780 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;