summaryrefslogtreecommitdiff
path: root/libarchive/archive_read_set_options.c
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2014-10-04 23:54:26 +0900
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2014-10-04 23:54:26 +0900
commitc5f2b0db37247fbaa446f5ca26e1bb76fbaf53e7 (patch)
treefcc998b18adf2ff5aa1a2ee99c676d23552429ba /libarchive/archive_read_set_options.c
parentc966ff4b197c4661a9d5835bb13ab6932af1f44f (diff)
downloadlibarchive-c5f2b0db37247fbaa446f5ca26e1bb76fbaf53e7.tar.gz
Remove unneeded null check.
Diffstat (limited to 'libarchive/archive_read_set_options.c')
-rw-r--r--libarchive/archive_read_set_options.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libarchive/archive_read_set_options.c b/libarchive/archive_read_set_options.c
index 46678b16..2e2eea69 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) {