diff options
author | Daiki Ueno <ueno@gnu.org> | 2020-11-12 10:57:21 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2020-11-19 15:38:02 +0100 |
commit | 79b8965b3392e8504ba48ee0fc28b1b8f23a8fcf (patch) | |
tree | 9bb8ec9769b12a6d04280d81e40eeeeaf04f9ec6 | |
parent | d268f19510a95f92d11d8f8dc7d94fcae4d765cc (diff) | |
download | gnutls-79b8965b3392e8504ba48ee0fc28b1b8f23a8fcf.tar.gz |
_gnutls_cert_log: assume that 'cert' is nonnull
This makes static analyzers happy.
Signed-off-by: Daiki Ueno <ueno@gnu.org>
-rw-r--r-- | lib/errors.h | 2 | ||||
-rw-r--r-- | lib/x509/ocsp.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/errors.h b/lib/errors.h index 30ed744a49..86c6b02765 100644 --- a/lib/errors.h +++ b/lib/errors.h @@ -98,7 +98,7 @@ void _gnutls_mpi_log(const char *prefix, bigint_t a); #define _gnutls_cert_log(str, cert) \ do { \ - if (unlikely(_gnutls_log_level >= 3 && cert != NULL)) { \ + if (unlikely(_gnutls_log_level >= 3)) { \ gnutls_datum_t _cl_out; int _cl_ret; \ _cl_ret = gnutls_x509_crt_print(cert, GNUTLS_CRT_PRINT_ONELINE, &_cl_out); \ if (_cl_ret >= 0) { \ diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c index caa511e9db..3e179a8aa9 100644 --- a/lib/x509/ocsp.c +++ b/lib/x509/ocsp.c @@ -2103,7 +2103,7 @@ _ocsp_resp_verify_direct(gnutls_ocsp_resp_const_t resp, goto done; } - _gnutls_cert_log("ocsp signer", signercert); \ + _gnutls_cert_log("ocsp signer", signercert); rc = gnutls_pubkey_import_x509(pubkey, signercert, 0); if (rc != GNUTLS_E_SUCCESS) { |