diff options
author | Guillem Jover <guillem@debian.org> | 2016-02-20 00:24:58 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2016-02-26 22:45:56 +0100 |
commit | 02c42aa6ddb9eb350ff34a80e9632c195b0db813 (patch) | |
tree | 263bb66de3b329ed137dad8bd3df38684d031cdb | |
parent | 91fc77d76c59a010a33651bc286c4b127f21b0a5 (diff) | |
download | dpkg-02c42aa6ddb9eb350ff34a80e9632c195b0db813.tar.gz |
dpkg: Switch addfiletolist() to tar_filenamenode_queue_push()
-rw-r--r-- | src/archives.c | 15 | ||||
-rw-r--r-- | src/archives.h | 3 | ||||
-rw-r--r-- | src/unpack.c | 2 |
3 files changed, 3 insertions, 17 deletions
diff --git a/src/archives.c b/src/archives.c index 80b9d8c1e..aa5f69194 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 819f2e990..34d1678cc 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 23e8e5cd4..081c269d6 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; } |