Skip to content

Commit aae568f

Browse files
committed
cleanup: rename _cleanup_evp_pkey_ctx_ to __cleanup_evp_pkey_ctx
Follow the new naming pattern of the compiler attributes which is just __NAME. This is what the kernel is using as well. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 11b4be9 commit aae568f

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

libnvme/src/nvme/linux.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static const EVP_MD *select_hmac(int hmac, size_t *hmac_len)
263263

264264
static DEFINE_CLEANUP_FUNC(
265265
cleanup_evp_pkey_ctx, EVP_PKEY_CTX *, EVP_PKEY_CTX_free)
266-
#define _cleanup_evp_pkey_ctx_ __cleanup(cleanup_evp_pkey_ctx)
266+
#define __cleanup_evp_pkey_ctx __cleanup(cleanup_evp_pkey_ctx)
267267

268268
/* NVMe is using the TLS 1.3 HkdfLabel structure */
269269
#define HKDF_INFO_MAX_LEN 514
@@ -303,7 +303,7 @@ static int derive_retained_key(struct libnvme_global_ctx *ctx,
303303
unsigned char *configured, unsigned char *retained,
304304
size_t key_len)
305305
{
306-
_cleanup_evp_pkey_ctx_ EVP_PKEY_CTX *ectx = NULL;
306+
__cleanup_evp_pkey_ctx EVP_PKEY_CTX *ectx = NULL;
307307
__cleanup_free uint8_t *hkdf_info = NULL;
308308
char *hkdf_label;
309309
const EVP_MD *md;
@@ -372,7 +372,7 @@ static int derive_retained_key_compat(struct libnvme_global_ctx *ctx,
372372
int hmac, const char *hostnqn, unsigned char *configured,
373373
unsigned char *retained, size_t key_len)
374374
{
375-
_cleanup_evp_pkey_ctx_ EVP_PKEY_CTX *ectx = NULL;
375+
__cleanup_evp_pkey_ctx EVP_PKEY_CTX *ectx = NULL;
376376
__cleanup_free uint8_t *hkdf_info = NULL;
377377
const EVP_MD *md;
378378
size_t hmac_len;
@@ -453,7 +453,7 @@ static int derive_tls_key(struct libnvme_global_ctx *ctx,
453453
int version, unsigned char cipher, const char *context,
454454
unsigned char *retained, unsigned char *psk, size_t key_len)
455455
{
456-
_cleanup_evp_pkey_ctx_ EVP_PKEY_CTX *ectx = NULL;
456+
__cleanup_evp_pkey_ctx EVP_PKEY_CTX *ectx = NULL;
457457
__cleanup_free uint8_t *hkdf_info = NULL;
458458
char *hkdf_label;
459459
const EVP_MD *md;
@@ -530,7 +530,7 @@ static int derive_tls_key_compat(struct libnvme_global_ctx *ctx,
530530
int version, unsigned char cipher, const char *context,
531531
unsigned char *retained, unsigned char *psk, size_t key_len)
532532
{
533-
_cleanup_evp_pkey_ctx_ EVP_PKEY_CTX *ectx = NULL;
533+
__cleanup_evp_pkey_ctx EVP_PKEY_CTX *ectx = NULL;
534534
__cleanup_free uint8_t *hkdf_info = NULL;
535535
const EVP_MD *md;
536536
size_t hmac_len;
@@ -598,7 +598,7 @@ static int derive_tls_key_compat(struct libnvme_global_ctx *ctx,
598598

599599
static DEFINE_CLEANUP_FUNC(
600600
cleanup_ossl_lib_ctx, OSSL_LIB_CTX *, OSSL_LIB_CTX_free)
601-
#define _cleanup_ossl_lib_ctx_ __cleanup(cleanup_ossl_lib_ctx)
601+
#define __cleanup_ossl_lib_ctx __cleanup(cleanup_ossl_lib_ctx)
602602
static DEFINE_CLEANUP_FUNC(cleanup_evp_mac_ctx, EVP_MAC_CTX *, EVP_MAC_CTX_free)
603603
#define __cleanup_evp_mac_ctx __cleanup(cleanup_evp_mac_ctx)
604604
static DEFINE_CLEANUP_FUNC(cleanup_evp_mac, EVP_MAC *, EVP_MAC_free)
@@ -610,7 +610,7 @@ __public int libnvme_gen_dhchap_key(struct libnvme_global_ctx *ctx,
610610
unsigned char *key)
611611
{
612612
const char hmac_seed[] = "NVMe-over-Fabrics";
613-
_cleanup_ossl_lib_ctx_ OSSL_LIB_CTX *lib_ctx = NULL;
613+
__cleanup_ossl_lib_ctx OSSL_LIB_CTX *lib_ctx = NULL;
614614
__cleanup_evp_mac_ctx EVP_MAC_CTX *mac_ctx = NULL;
615615
__cleanup_evp_mac EVP_MAC *mac = NULL;
616616
OSSL_PARAM params[2], *p = params;
@@ -678,7 +678,7 @@ static int derive_psk_digest(struct libnvme_global_ctx *ctx,
678678
char *digest, size_t digest_len)
679679
{
680680
static const char hmac_seed[] = "NVMe-over-Fabrics";
681-
_cleanup_ossl_lib_ctx_ OSSL_LIB_CTX *lib_ctx = NULL;
681+
__cleanup_ossl_lib_ctx OSSL_LIB_CTX *lib_ctx = NULL;
682682
__cleanup_evp_mac_ctx EVP_MAC_CTX *mac_ctx = NULL;
683683
__cleanup_free unsigned char *psk_ctx = NULL;
684684
__cleanup_evp_mac EVP_MAC *mac = NULL;

0 commit comments

Comments
 (0)