From 79b8965b3392e8504ba48ee0fc28b1b8f23a8fcf Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Thu, 12 Nov 2020 10:57:21 +0100 Subject: _gnutls_cert_log: assume that 'cert' is nonnull This makes static analyzers happy. Signed-off-by: Daiki Ueno --- lib/errors.h | 2 +- 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) { -- cgit v1.2.1