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:
parent
95bad3329f
commit
443887d7cc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user