Handle a zero elements argument.

PR:		8566
Submitted by:	Archie Cobbs <archie@whistle.com>
This commit is contained in:
Robert Nordier 1998-11-04 08:55:34 +00:00
parent c194030b86
commit 7fb5f2bae4

View File

@ -111,6 +111,9 @@ mergesort(base, nmemb, size, cmp)
return (-1);
}
if (nmemb == 0)
return (0);
/*
* XXX
* Stupid subtraction for the Cray.