diff options
author | Graham Percival <gperciva@tarsnap.com> | 2016-06-13 16:13:06 -0700 |
---|---|---|
committer | Graham Percival <gperciva@tarsnap.com> | 2016-06-13 16:13:06 -0700 |
commit | c7fb9682b1a0a98f11c9d62bc238556a6e4f6066 (patch) | |
tree | 8dc447a5915fe00fabbaab299db2fb578a72259b /libarchive/archive_entry_xattr.c | |
parent | ecdac4d50db0cf5a0c630ba077729aaa6c5a2dd2 (diff) | |
download | libarchive-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.c | 3 |
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"); |