Remove steal_pointer and steal_pointer_impl as we link in glib now
authorEric Curtin <ecurtin@redhat.com>
Mon, 17 Jul 2023 12:23:27 +0000 (13:23 +0100)
committerEric Curtin <ecurtin@redhat.com>
Mon, 17 Jul 2023 12:23:27 +0000 (13:23 +0100)
These were necessary to keep initramfs small, but now we link in glib
anyway so these functions are now redundant.

src/switchroot/ostree-mount-util.h

index 4404c232dd87ce9a429bb0cda014e86e5511126b..85f3443eb5f4f128258a722b8321c36b66a63abb 100644 (file)
@@ -41,7 +41,6 @@
 #define _OSTREE_COMPOSEFS_ROOT_STAMP "/run/ostree-composefs-root.stamp"
 
 #define autofree __attribute__ ((cleanup (cleanup_free)))
-#define steal_pointer(pp) steal_pointer_impl ((void **)pp)
 
 static inline int
 path_is_on_readonly_fs (const char *path)
@@ -89,15 +88,6 @@ cleanup_free (void *p)
   free (*pp);
 }
 
-static inline void *
-steal_pointer_impl (void **to_steal)
-{
-  void *ret = *to_steal;
-  *to_steal = NULL;
-
-  return ret;
-}
-
 static inline char *
 read_proc_cmdline_key (const char *key)
 {