]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Remove unneeded null check.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 4 Oct 2014 14:54:26 +0000 (23:54 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 4 Oct 2014 14:54:26 +0000 (23:54 +0900)
libarchive/archive_read_set_options.c

index 46678b163600b4f43b702f4ab57fb3aa9a6ac3a7..2e2eea69058dae4807f799b9e094967570720ec4 100644 (file)
@@ -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) {