Harmonize use of sk_TYPE_find's return value.
authorAndy Polyakov <appro@openssl.org>
Sun, 5 Aug 2018 14:50:41 +0000 (16:50 +0200)
committerAndy Polyakov <appro@openssl.org>
Tue, 7 Aug 2018 06:56:54 +0000 (08:56 +0200)
commit5b37fef04a2b765835361f0652aaa0c41ed1b842
tree47677e73f897a8b5921437c53c93070e61dec321
parent28ad73181aeb3b0b027d53d3266159f4b2e15d5b
Harmonize use of sk_TYPE_find's return value.

In some cases it's about redundant check for return value, in some
cases it's about replacing check for -1 with comparison to 0.
Otherwise compiler might generate redundant check for <-1. [Even
formatting and readability fixes.]

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6860)
14 files changed:
crypto/asn1/asn_mime.c
crypto/evp/evp_pbe.c
crypto/objects/obj_xref.c
crypto/x509/by_dir.c
crypto/x509/x509_lu.c
crypto/x509/x509_trs.c
crypto/x509/x509_vpm.c
crypto/x509/x_crl.c
crypto/x509v3/pcy_cache.c
crypto/x509v3/pcy_node.c
crypto/x509v3/pcy_tree.c
crypto/x509v3/v3_lib.c
crypto/x509v3/v3_purp.c
ssl/ssl_ciph.c