From 8827cd0f38c0f9f388ce308de3210c3aa41055c6 Mon Sep 17 00:00:00 2001 From: Caleb Sander Date: Tue, 28 Nov 2023 13:17:45 -0700 Subject: [PATCH] cleanup: remove unused cleanup_charp() cleanup_charp() appears to have been copied from libnvme, but it has no users. _cleanup_free_ is more general, anyways. So remove cleanup_charp() along with cleanup.c. Signed-off-by: Caleb Sander --- util/cleanup.c | 5 ----- util/cleanup.h | 2 -- util/meson.build | 1 - 3 files changed, 8 deletions(-) delete mode 100644 util/cleanup.c diff --git a/util/cleanup.c b/util/cleanup.c deleted file mode 100644 index d6ac7c67..00000000 --- a/util/cleanup.c +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -#include -#include "cleanup.h" - -DEFINE_CLEANUP_FUNC(cleanup_charp, char *, free); diff --git a/util/cleanup.h b/util/cleanup.h index ad1d0cda..ee9b1206 100644 --- a/util/cleanup.h +++ b/util/cleanup.h @@ -19,8 +19,6 @@ DECLARE_CLEANUP_FUNC(name, type) \ free_fn(*__p); \ } -DECLARE_CLEANUP_FUNC(cleanup_charp, char *); - static inline void freep(void *p) { free(*(void**) p); diff --git a/util/meson.build b/util/meson.build index c0ff637b..dfc683bc 100644 --- a/util/meson.build +++ b/util/meson.build @@ -3,7 +3,6 @@ sources += [ 'util/argconfig.c', 'util/base64.c', - 'util/cleanup.c', 'util/crc32.c', 'util/mem.c', 'util/suffix.c', -- 2.49.0