Make OPENSSL_sk_push return only 0 or 1
authorTomas Mraz <tomas@openssl.org>
Mon, 4 Dec 2023 10:16:45 +0000 (11:16 +0100)
committerTomas Mraz <tomas@openssl.org>
Thu, 4 Jan 2024 13:51:48 +0000 (14:51 +0100)
commit98d6016afec4c0bc7bb8f33b5061beb8528cc74a
treec3ae8ee7574e1f36a161da74eb5e4b9f7285124f
parent8b9cf1bc2c3085b6e9493a057209ffd0bddf48a6
Make OPENSSL_sk_push return only 0 or 1

Most of the callers do not actually check for
the special -1 return condition because they do not
pass NULL to it. It is also extremely improbable that
any code depends on this -1 return value in this condition
so it can be safely changed to 0 return.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/22930)
CHANGES.md
crypto/stack/stack.c
doc/man3/DEFINE_STACK_OF.pod