mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00:00
Handle a zero elements argument.
PR: 8566 Submitted by: Archie Cobbs <archie@whistle.com>
This commit is contained in:
parent
c194030b86
commit
7fb5f2bae4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40896
@ -111,6 +111,9 @@ mergesort(base, nmemb, size, cmp)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (nmemb == 0)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* Stupid subtraction for the Cray.
|
||||
|
Loading…
Reference in New Issue
Block a user