summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2007-05-21 04:45:24 +0000
committercperciva <cperciva@FreeBSD.org>2007-05-21 04:45:24 +0000
commitf0e9277351d131ebcb8cf08cb5acffe41a1ac16a (patch)
treeef7129acfc1921e6d1376bd377e41c80d24e99c6
parent9eb753ea8e6b2c65f424b82dbde5d1edbfabe6f9 (diff)
downloadFreeBSD-src-f0e9277351d131ebcb8cf08cb5acffe41a1ac16a.zip
FreeBSD-src-f0e9277351d131ebcb8cf08cb5acffe41a1ac16a.tar.gz
Don't test for NULL when it is both unnecessary (the pointer is checked
against NULL when it is first allocated) and pointless (we've already dereferenced the pointer several times). Found by: Coverity Prevent(tm) CID: 3204
-rw-r--r--lib/libarchive/archive_read_support_format_tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libarchive/archive_read_support_format_tar.c b/lib/libarchive/archive_read_support_format_tar.c
index 3f52cab..d778b9d 100644
--- a/lib/libarchive/archive_read_support_format_tar.c
+++ b/lib/libarchive/archive_read_support_format_tar.c
@@ -1168,7 +1168,7 @@ pax_header(struct archive_read *a, struct tar *tar, struct archive_entry *entry,
return (-1);
while (*wp && *wp != L'=')
++wp;
- if (*wp == L'\0' || wp == NULL) {
+ if (*wp == L'\0') {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Invalid pax extended attributes");
return (ARCHIVE_WARN);
OpenPOWER on IntegriCloud