From 46edef001767ded0a93a0d8680f78d0a05b900cc Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 2 Nov 2018 13:26:20 -0400 Subject: [PATCH] app/compose: Drop helper cachedir_dfd() function We don't actually need this helper here since we always initialize `self->cachedir_dfd` nowadays. I took a closer look at this initially because it was confusing ctags due to the function being named the same as the struct member it returns. Closes: #1658 Approved by: cgwalters --- src/app/rpmostree-compose-builtin-tree.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/app/rpmostree-compose-builtin-tree.c b/src/app/rpmostree-compose-builtin-tree.c index a372ccd0..e551b76f 100644 --- a/src/app/rpmostree-compose-builtin-tree.c +++ b/src/app/rpmostree-compose-builtin-tree.c @@ -155,12 +155,6 @@ rpm_ostree_tree_compose_context_free (RpmOstreeTreeComposeContext *ctx) } G_DEFINE_AUTOPTR_CLEANUP_FUNC(RpmOstreeTreeComposeContext, rpm_ostree_tree_compose_context_free) -static int -cachedir_dfd (RpmOstreeTreeComposeContext *self) -{ - return self->cachedir_dfd != -1 ? self->cachedir_dfd : self->workdir_dfd; -} - static void on_hifstate_percentage_changed (DnfState *hifstate, guint percentage, @@ -247,7 +241,7 @@ install_packages (RpmOstreeTreeComposeContext *self, */ if (opt_unified_core) { - self->pkgcache_repo = ostree_repo_create_at (cachedir_dfd (self), "pkgcache-repo", + self->pkgcache_repo = ostree_repo_create_at (self->cachedir_dfd, "pkgcache-repo", OSTREE_REPO_MODE_BARE_USER, NULL, cancellable, error); if (!self->pkgcache_repo)