Skip to content

Commit 986521e

Browse files
committed
cleanup: rename _cleanup_dirents_ to __cleanup_dirents
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 e041a99 commit 986521e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

libnvme/src/nvme/tree.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static void cleanup_dirents(struct dirents *ents)
109109
free(ents->ents);
110110
}
111111

112-
#define _cleanup_dirents_ __cleanup(cleanup_dirents)
112+
#define __cleanup_dirents __cleanup(cleanup_dirents)
113113

114114
static char *nvme_hostid_from_hostnqn(const char *hostnqn)
115115
{
@@ -280,7 +280,7 @@ static void libnvme_filter_tree(struct libnvme_global_ctx *ctx,
280280
__public int libnvme_scan_topology(struct libnvme_global_ctx *ctx,
281281
libnvme_scan_filter_t f, void *f_args)
282282
{
283-
_cleanup_dirents_ struct dirents subsys = {}, ctrls = {};
283+
__cleanup_dirents struct dirents subsys = {}, ctrls = {};
284284
int i, ret;
285285

286286
if (!ctx)
@@ -686,7 +686,7 @@ struct libnvme_host *libnvme_lookup_host(struct libnvme_global_ctx *ctx,
686686
static int nvme_subsystem_scan_namespaces(struct libnvme_global_ctx *ctx,
687687
libnvme_subsystem_t s)
688688
{
689-
_cleanup_dirents_ struct dirents namespaces = {};
689+
__cleanup_dirents struct dirents namespaces = {};
690690
int i, ret;
691691

692692
if (ctx->create_only) {
@@ -1578,7 +1578,7 @@ libnvme_ctrl_t libnvme_lookup_ctrl(libnvme_subsystem_t s,
15781578
static int libnvme_ctrl_scan_paths(struct libnvme_global_ctx *ctx,
15791579
struct libnvme_ctrl *c)
15801580
{
1581-
_cleanup_dirents_ struct dirents paths = {};
1581+
__cleanup_dirents struct dirents paths = {};
15821582
int err, i;
15831583

15841584
if (ctx->create_only) {
@@ -1602,7 +1602,7 @@ static int libnvme_ctrl_scan_paths(struct libnvme_global_ctx *ctx,
16021602
static int libnvme_ctrl_scan_namespaces(struct libnvme_global_ctx *ctx,
16031603
struct libnvme_ctrl *c)
16041604
{
1605-
_cleanup_dirents_ struct dirents namespaces = {};
1605+
__cleanup_dirents struct dirents namespaces = {};
16061606
int err, i;
16071607

16081608
if (ctx->create_only) {
@@ -1625,7 +1625,7 @@ static int libnvme_ctrl_lookup_subsystem_name(struct libnvme_global_ctx *ctx,
16251625
const char *ctrl_name, char **name)
16261626
{
16271627
const char *subsys_dir = libnvme_subsys_sysfs_dir();
1628-
_cleanup_dirents_ struct dirents subsys = {};
1628+
__cleanup_dirents struct dirents subsys = {};
16291629
int i;
16301630

16311631
subsys.num = libnvme_scan_subsystems(&subsys.ents);

0 commit comments

Comments
 (0)