Skip to content

Commit fd90948

Browse files
committed
cleanup: rename _cleanup_dir_ to __cleanup_dir
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 ee56b21 commit fd90948

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

libnvme/src/nvme/cleanup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static inline DEFINE_CLEANUP_FUNC(cleanup_file, FILE *, fclose)
3535
#define __cleanup_file __cleanup(cleanup_file)
3636

3737
static inline DEFINE_CLEANUP_FUNC(cleanup_dir, DIR *, closedir)
38-
#define _cleanup_dir_ __cleanup(cleanup_dir)
38+
#define __cleanup_dir __cleanup(cleanup_dir)
3939

4040
static inline void cleanup_fd(int *fd)
4141
{

libnvme/src/nvme/linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1748,7 +1748,7 @@ static bool is_dmi_uuid_valid(const char *buf, size_t len)
17481748

17491749
static int uuid_from_dmi_entries(char *system_uuid)
17501750
{
1751-
_cleanup_dir_ DIR *d = NULL;
1751+
__cleanup_dir DIR *d = NULL;
17521752
const char *entries_dir = libnvme_dmi_entries_dir();
17531753
int f;
17541754
struct dirent *de;

libnvme/src/nvme/tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1658,7 +1658,7 @@ static int libnvme_ctrl_lookup_phy_slot(struct libnvme_global_ctx *ctx,
16581658
{
16591659
const char *slots_sysfs_dir = libnvme_slots_sysfs_dir();
16601660
__cleanup_free char *target_addr = NULL;
1661-
_cleanup_dir_ DIR *slots_dir = NULL;
1661+
__cleanup_dir DIR *slots_dir = NULL;
16621662
struct dirent *entry;
16631663
char *slot;
16641664
int ret;

0 commit comments

Comments
 (0)