if no comparison function set make sk_sort no op

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 0ca2e82ab1)
This commit is contained in:
Dr. Stephen Henson 2016-02-06 17:07:58 +00:00
parent a3baa17105
commit 402fb1896b

View File

@ -360,7 +360,7 @@ void *sk_set(_STACK *st, int i, void *value)
void sk_sort(_STACK *st)
{
if (st && !st->sorted) {
if (st && !st->sorted && st->comp != NULL) {
int (*comp_func) (const void *, const void *);
/*