summaryrefslogtreecommitdiff
path: root/libarchive/archive_entry_xattr.c
diff options
context:
space:
mode:
authorGraham Percival <gperciva@tarsnap.com>2016-06-13 16:13:06 -0700
committerGraham Percival <gperciva@tarsnap.com>2016-06-13 16:13:06 -0700
commitc7fb9682b1a0a98f11c9d62bc238556a6e4f6066 (patch)
tree8dc447a5915fe00fabbaab299db2fb578a72259b /libarchive/archive_entry_xattr.c
parentecdac4d50db0cf5a0c630ba077729aaa6c5a2dd2 (diff)
downloadlibarchive-c7fb9682b1a0a98f11c9d62bc238556a6e4f6066.tar.gz
Remove dead code in archive_entry_xattr_add_entry()
The code seems to be walking through the linked list beginning at entry->xattr_head, but then it immediately sets xp to be something different. This is 10-year old code; it was added in the first "POSIX.1e-style Extended Attribute support" commit, on March 21 2006: https://svnweb.freebsd.org/base/head/lib/libarchive/archive_entry.c?annotate=156961&pathrev=156961#l1387
Diffstat (limited to 'libarchive/archive_entry_xattr.c')
-rw-r--r--libarchive/archive_entry_xattr.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/libarchive/archive_entry_xattr.c b/libarchive/archive_entry_xattr.c
index 20b29d08..5fe726b9 100644
--- a/libarchive/archive_entry_xattr.c
+++ b/libarchive/archive_entry_xattr.c
@@ -91,9 +91,6 @@ archive_entry_xattr_add_entry(struct archive_entry *entry,
{
struct ae_xattr *xp;
- for (xp = entry->xattr_head; xp != NULL; xp = xp->next)
- ;
-
if ((xp = (struct ae_xattr *)malloc(sizeof(struct ae_xattr))) == NULL)
__archive_errx(1, "Out of memory");