[Reproducible-commits] [dpkg] 26/63: dpkg: Switch remove_file_from_list() to tar_filenamenode_queue_pop()

Jérémy Bobbio lunar at moszumanska.debian.org
Fri Mar 4 17:44:43 UTC 2016


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/buildinfo
in repository dpkg.

commit 91fc77d76c59a010a33651bc286c4b127f21b0a5
Author: Guillem Jover <guillem at debian.org>
Date:   Sat Feb 20 00:24:05 2016 +0100

    dpkg: Switch remove_file_from_list() to tar_filenamenode_queue_pop()
    
    The new function uses a namespaced function name, and is not based on
    tarcontext, nor gets an unused tar_entry argument any more.
---
 src/archives.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/archives.c b/src/archives.c
index 0434e36..80b9d8c 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -129,6 +129,16 @@ tar_filenamenode_queue_push(struct filenamenode_queue *queue,
   return node;
 }
 
+static void
+tar_filenamenode_queue_pop(struct filenamenode_queue *queue,
+                           struct fileinlist **tail_prev,
+                           struct fileinlist *node)
+{
+  tar_pool_free(node);
+  *queue->tail = *tail_prev;
+  *tail_prev = NULL;
+}
+
 /**
  * Check if a file or directory will save a package from disappearance.
  *
@@ -609,16 +619,6 @@ struct fileinlist *addfiletolist(struct tarcontext *tc,
   return nifd;
 }
 
-static void
-remove_file_from_list(struct tarcontext *tc, struct tar_entry *ti,
-                      struct fileinlist **oldnifd,
-                      struct fileinlist *nifd)
-{
-  tar_pool_free(nifd);
-  *tc->newfiles_queue->tail = *oldnifd;
-  *oldnifd = NULL;
-}
-
 static bool
 linktosameexistingdir(const struct tar_entry *ti, const char *fname,
                       struct varbuf *symlinkfn)
@@ -937,7 +937,7 @@ tarobject(void *ctx, struct tar_entry *ti)
   if (keepexisting) {
     if (nifd->namenode->flags & fnnf_new_conff)
       nifd->namenode->flags |= fnnf_obs_conff;
-    remove_file_from_list(tc, ti, oldnifd, nifd);
+    tar_filenamenode_queue_pop(tc->newfiles_queue, oldnifd, nifd);
     tarobject_skip_entry(tc, ti);
     return 0;
   }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list