Skip to content

Commit 5f3827f

Browse files
committed
cleanup: rename _cleanup_nvmf_context_ to __cleanup_nvmf_context
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 fbc6bdd commit 5f3827f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

fabrics.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ int fabrics_discovery(const char *desc, int argc, char **argv, bool connect)
480480
char *context = NULL;
481481
nvme_print_flags_t flags;
482482
__cleanup_nvme_global_ctx struct libnvme_global_ctx *ctx = NULL;
483-
_cleanup_nvmf_context_ struct libnvmf_context *fctx = NULL;
483+
__cleanup_nvmf_context struct libnvmf_context *fctx = NULL;
484484
int ret;
485485
struct libnvme_fabrics_config cfg;
486486
struct nvmf_args fa = { .subsysnqn = NVME_DISC_SUBSYS_NAME };
@@ -592,7 +592,7 @@ int fabrics_connect(const char *desc, int argc, char **argv)
592592
char *config_file = NULL;
593593
char *context = NULL;
594594
__cleanup_nvme_global_ctx struct libnvme_global_ctx *ctx = NULL;
595-
_cleanup_nvmf_context_ struct libnvmf_context *fctx = NULL;
595+
__cleanup_nvmf_context struct libnvmf_context *fctx = NULL;
596596
__cleanup_nvme_ctrl libnvme_ctrl_t c = NULL;
597597
int ret;
598598
nvme_print_flags_t flags;
@@ -931,7 +931,7 @@ int fabrics_config(const char *desc, int argc, char **argv)
931931
}
932932

933933
if (modify_config) {
934-
_cleanup_nvmf_context_ struct libnvmf_context *fctx = NULL;
934+
__cleanup_nvmf_context struct libnvmf_context *fctx = NULL;
935935

936936
if (!fa.subsysnqn) {
937937
fprintf(stderr,

util/cleanup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static inline void cleanup_nvmf_context(struct libnvmf_context **fctx)
5757
{
5858
libnvmf_context_free(*fctx);
5959
}
60-
#define _cleanup_nvmf_context_ __cleanup(cleanup_nvmf_context)
60+
#define __cleanup_nvmf_context __cleanup(cleanup_nvmf_context)
6161
#endif
6262

6363
static inline DEFINE_CLEANUP_FUNC(cleanup_file, FILE *, fclose)

0 commit comments

Comments
 (0)