diff options
author | cperciva <cperciva@FreeBSD.org> | 2008-06-09 14:44:56 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2008-06-09 14:44:56 +0000 |
commit | 443887d7ccb79442fd4d90b6123bdf546261e50d (patch) | |
tree | 13eea4be364bd276bd475d3074dd3c53ff0ba922 /lib/libarchive | |
parent | 95bad3329f6acab7fea233b66e858274828ed69d (diff) | |
download | FreeBSD-src-443887d7ccb79442fd4d90b6123bdf546261e50d.zip FreeBSD-src-443887d7ccb79442fd4d90b6123bdf546261e50d.tar.gz |
Don't store a pointer in "next" if we're never going to use it.
Fix typo in checking results of strchr.
Found by: Coverity Prevent
Diffstat (limited to 'lib/libarchive')
-rw-r--r-- | lib/libarchive/archive_read_support_format_mtree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libarchive/archive_read_support_format_mtree.c b/lib/libarchive/archive_read_support_format_mtree.c index 1d770ba..56f9aed 100644 --- a/lib/libarchive/archive_read_support_format_mtree.c +++ b/lib/libarchive/archive_read_support_format_mtree.c @@ -308,7 +308,7 @@ process_global_unset(struct archive_read *a, size_t len; line += 6; - if ((next = strchr(line, '=')) != NULL) { + if (strchr(line, '=') != NULL) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "/unset shall not contain `='"); return ARCHIVE_FATAL; @@ -759,7 +759,7 @@ parse_device(struct archive *a, struct archive_entry *entry, char *val) } ++comma1; comma2 = strchr(comma1, ','); - if (comma1 == NULL) { + if (comma2 == NULL) { archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, "Malformed device attribute"); return (ARCHIVE_WARN); |