From b3cc3bcd93d7aa9724c38a7c8307a1376ad1f98c Mon Sep 17 00:00:00 2001 From: Sebastian Freundt Date: Tue, 10 Jun 2014 11:15:42 +0000 Subject: 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. --- libarchive/archive_read_support_format_warc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libarchive/archive_read_support_format_warc.c') diff --git a/libarchive/archive_read_support_format_warc.c b/libarchive/archive_read_support_format_warc.c index ebdf1a2b..82ed3cc0 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); -- cgit v1.2.1