9
0
Fork 0

qsort: Fix wrong check

The check for overflow accidently was exactly the opposite.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2012-08-03 08:27:49 +02:00
parent 6efca01b82
commit 3af8c180cb
1 changed files with 1 additions and 1 deletions

View File

@ -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;