mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Handle a zero elements argument.
PR: 8566 Submitted by: Archie Cobbs <archie@whistle.com>
This commit is contained in:
parent
c194030b86
commit
7fb5f2bae4
1 changed files with 3 additions and 0 deletions
|
|
@ -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 a new issue