Skip to content

Commit

Permalink
linux: Explicitly initialize auto-cleanup variables
Browse files Browse the repository at this point in the history
gcc complains about potentially	uninitialized variables.

Signed-off-by: Tomas Bzatek <[email protected]>
  • Loading branch information
tbzatek committed Feb 9, 2024
1 parent 24a5580 commit 74324a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nvme/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ int nvme_gen_dhchap_key(char *hostnqn, enum nvme_hmac_alg hmac,
unsigned char *key)
{
const char hmac_seed[] = "NVMe-over-Fabrics";
_cleanup_hmac_ctx_ HMAC_CTX *hmac_ctx;
_cleanup_hmac_ctx_ HMAC_CTX *hmac_ctx = NULL;
const EVP_MD *md;

ENGINE_load_builtin_engines();
Expand Down Expand Up @@ -881,7 +881,7 @@ int nvme_gen_dhchap_key(char *hostnqn, enum nvme_hmac_alg hmac,
{
const char hmac_seed[] = "NVMe-over-Fabrics";
OSSL_PARAM params[2], *p = params;
_cleanup_ossl_lib_ctx_ OSSL_LIB_CTX *lib_ctx;
_cleanup_ossl_lib_ctx_ OSSL_LIB_CTX *lib_ctx = NULL;
_cleanup_evp_mac_ctx_ EVP_MAC_CTX *mac_ctx = NULL;
_cleanup_evp_mac_ EVP_MAC *mac = NULL;
char *progq = NULL;
Expand Down

0 comments on commit 74324a4

Please sign in to comment.