From: Sebastian Freundt Date: Tue, 10 Jun 2014 11:15:42 +0000 (+0000) Subject: Hygiene, trust __archive_read_ahead() and kick superfluous check. X-Git-Tag: v3.1.900a~295^2^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3cc3bcd93d7aa9724c38a7c8307a1376ad1f98c;p=thirdparty%2Flibarchive.git Hygiene, trust __archive_read_ahead() and kick superfluous check. 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. --- diff --git a/libarchive/archive_read_support_format_warc.c b/libarchive/archive_read_support_format_warc.c index ebdf1a2b8..82ed3cc05 100644 --- a/libarchive/archive_read_support_format_warc.c +++ b/libarchive/archive_read_support_format_warc.c @@ -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);