Handle a zero elements argument.
PR: 8566 Submitted by: Archie Cobbs <archie@whistle.com>
This commit is contained in:
parent
c194030b86
commit
7fb5f2bae4
@ -111,6 +111,9 @@ mergesort(base, nmemb, size, cmp)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (nmemb == 0)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* Stupid subtraction for the Cray.
|
||||
|
Loading…
x
Reference in New Issue
Block a user