]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Hygiene, trust __archive_read_ahead() and kick superfluous check.
authorSebastian Freundt <freundt@ga-group.nl>
Tue, 10 Jun 2014 11:15:42 +0000 (11:15 +0000)
committerSebastian Freundt <freundt@ga-group.nl>
Tue, 10 Jun 2014 11:15:42 +0000 (11:15 +0000)
Heeding Tim's advice, a non-NULL from __archive_read_ahead() is
guaranteed to be of at least the minimum size, therefore no need to
check for this condition again.

libarchive/archive_read_support_format_warc.c

index ebdf1a2b8a8a9bcb9d2b3689cffdaf472b1b006e..82ed3cc05f39784f93771ef701e123356b8b6394 100644 (file)
@@ -216,7 +216,7 @@ start_over:
                        &a->archive, ARCHIVE_ERRNO_MISC,
                        "Bad record header");
                return (ARCHIVE_FATAL);
-       } else if (nrd < 12 || buf == NULL) {
+       } else if (buf == NULL) {
                /* there should be room for at least WARC/bla\r\n
                 * must be EOF therefore */
                return (ARCHIVE_EOF);