[#OPENSSL_sk_set_cmp_func]
= OPENSSL&lowbar;sk&lowbar;set&lowbar;cmp&lowbar;func
:mrdocs:

Install a comparison function on a stack and mark it as unsorted&period;

== Synopsis

Declared in `&lt;openssl&sol;stack&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:OPENSSL_sk_compfunc.adoc[OPENSSL&lowbar;sk&lowbar;compfunc]
OPENSSL&lowbar;sk&lowbar;set&lowbar;cmp&lowbar;func(
    xref:OPENSSL_STACK.adoc[OPENSSL&lowbar;STACK]* sk,
    xref:OPENSSL_sk_compfunc.adoc[OPENSSL&lowbar;sk&lowbar;compfunc] cmp);
----

== Return Value

Previous comparison function, or NULL&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *sk*
| Stack to update&period;
| *cmp*
| New comparison callback, or NULL to clear ordering&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
