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