From c5f2b0db37247fbaa446f5ca26e1bb76fbaf53e7 Mon Sep 17 00:00:00 2001 From: Michihiro NAKAJIMA Date: Sat, 4 Oct 2014 23:54:26 +0900 Subject: [PATCH] Remove unneeded null check. --- libarchive/archive_read_set_options.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) { -- 2.47.2