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:
parent
6efca01b82
commit
3af8c180cb
|
@ -31,7 +31,7 @@ void qsort(void *base,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* check for overflow */
|
/* check for overflow */
|
||||||
if (nel <= ((size_t)(-1)) / width)
|
if (nel > ((size_t)(-1)) / width)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wgap = 0;
|
wgap = 0;
|
||||||
|
|
Loading…
Reference in New Issue