From: Michihiro NAKAJIMA Date: Sat, 4 Oct 2014 14:54:26 +0000 (+0900) Subject: Remove unneeded null check. X-Git-Tag: v3.1.900a~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5f2b0db37247fbaa446f5ca26e1bb76fbaf53e7;p=thirdparty%2Flibarchive.git Remove unneeded null check. --- diff --git a/libarchive/archive_read_set_options.c b/libarchive/archive_read_set_options.c index 46678b163..2e2eea690 100644 --- a/libarchive/archive_read_set_options.c +++ b/libarchive/archive_read_set_options.c @@ -76,14 +76,13 @@ archive_set_format_option(struct archive *_a, const char *m, const char *o, const char *v) { struct archive_read *a = (struct archive_read *)_a; - struct archive_format_descriptor *format; size_t i; int r, rv = ARCHIVE_WARN, matched_modules = 0; for (i = 0; i < sizeof(a->formats)/sizeof(a->formats[0]); i++) { - format = &a->formats[i]; - if (format == NULL || format->options == NULL || - format->name == NULL) + struct archive_format_descriptor *format = &a->formats[i]; + + if (format->options == NULL || format->name == NULL) /* This format does not support option. */ continue; if (m != NULL) {