[Reproducible-commits] [dpkg] 27/63: dpkg: Switch addfiletolist() to tar_filenamenode_queue_push()

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 02c42aa6ddb9eb350ff34a80e9632c195b0db813
Author: Guillem Jover <guillem at debian.org>
Date:   Sat Feb 20 00:24:58 2016 +0100

    dpkg: Switch addfiletolist() to tar_filenamenode_queue_push()
---
 src/archives.c | 15 ++-------------
 src/archives.h |  3 ---
 src/unpack.c   |  2 +-
 3 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/src/archives.c b/src/archives.c
index 80b9d8c..aa5f691 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -607,18 +607,6 @@ void setupfnamevbs(const char *filename) {
         fnamevb.buf, fnametmpvb.buf, fnamenewvb.buf);
 }
 
-struct fileinlist *addfiletolist(struct tarcontext *tc,
-				 struct filenamenode *namenode) {
-  struct fileinlist *nifd;
-
-  nifd = tar_pool_alloc(sizeof(*nifd));
-  nifd->namenode= namenode;
-  nifd->next = NULL;
-  *tc->newfiles_queue->tail = nifd;
-  tc->newfiles_queue->tail = &nifd->next;
-  return nifd;
-}
-
 static bool
 linktosameexistingdir(const struct tar_entry *ti, const char *fname,
                       struct varbuf *symlinkfn)
@@ -694,7 +682,8 @@ tarobject(void *ctx, struct tar_entry *ti)
    * The trailing ‘/’ put on the end of names in tarfiles has already
    * been stripped by tar_extractor(). */
   oldnifd = tc->newfiles_queue->tail;
-  nifd= addfiletolist(tc, findnamenode(ti->name, 0));
+  nifd = tar_filenamenode_queue_push(tc->newfiles_queue,
+                                     findnamenode(ti->name, 0));
   nifd->namenode->flags |= fnnf_new_inarchive;
 
   debug(dbg_eachfile,
diff --git a/src/archives.h b/src/archives.h
index 819f2e9..34d1678 100644
--- a/src/archives.h
+++ b/src/archives.h
@@ -86,9 +86,6 @@ void check_conflict(struct dependency *dep, struct pkginfo *pkg,
 void check_breaks(struct dependency *dep, struct pkginfo *pkg,
                   const char *pfilename);
 
-struct fileinlist *addfiletolist(struct tarcontext *tc,
-				 struct filenamenode *namenode);
-
 extern int cleanup_pkg_failed, cleanup_conflictor_failed;
 
 #endif /* ARCHIVES_H */
diff --git a/src/unpack.c b/src/unpack.c
index 23e8e5c..081c269 100644
--- a/src/unpack.c
+++ b/src/unpack.c
@@ -1138,7 +1138,7 @@ void process_archive(const char *filename) {
 		" is disappearing", namenode->name);
 	  namenode->flags |= fnnf_obs_conff;
 	  tar_filenamenode_queue_push(&newconffiles, namenode);
-	  addfiletolist(&tc, namenode);
+	  tar_filenamenode_queue_push(&newfiles_queue, namenode);
 	}
 	continue;
       }

-- 
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