]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
cleanup: remove unused cleanup_charp()
authorCaleb Sander <csander@purestorage.com>
Tue, 28 Nov 2023 20:17:45 +0000 (13:17 -0700)
committerDaniel Wagner <wagi@monom.org>
Fri, 1 Dec 2023 13:53:34 +0000 (14:53 +0100)
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 <csander@purestorage.com>
util/cleanup.c [deleted file]
util/cleanup.h
util/meson.build

diff --git a/util/cleanup.c b/util/cleanup.c
deleted file mode 100644 (file)
index d6ac7c6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-#include <stdlib.h>
-#include "cleanup.h"
-
-DEFINE_CLEANUP_FUNC(cleanup_charp, char *, free);
index ad1d0cda8b6ccb108fdafc71dc6f91c05d426aa6..ee9b120606f5ec1a11e4e19cc628425ddc768ae8 100644 (file)
@@ -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);
index c0ff637b3672694afcb76d851c14c6752ea24643..dfc683bcb629dc3f98c487799bca463644b2373e 100644 (file)
@@ -3,7 +3,6 @@
 sources += [
   'util/argconfig.c',
   'util/base64.c',
-  'util/cleanup.c',
   'util/crc32.c',
   'util/mem.c',
   'util/suffix.c',