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
This commit is contained in:
Colin Percival 2008-06-09 14:44:56 +00:00
parent f6dd73207f
commit 7254457b50
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=179679

View file

@ -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);