]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Avoid struct init with variable
authorBrad King <brad.king@kitware.com>
Thu, 26 Sep 2013 12:58:24 +0000 (08:58 -0400)
committerBrad King <brad.king@kitware.com>
Thu, 26 Sep 2013 12:58:24 +0000 (08:58 -0400)
Compilers such as Borland and MIPSpro do not like struct initialization
with variables.  Initialize using assignment instead.

libarchive/archive_read_open_filename.c

index fefcd904d2c42333815520a6af7e0e906bdc7c32..622c960c46085aa4acaba6681821101a0c71aabf 100644 (file)
@@ -103,7 +103,9 @@ int
 archive_read_open_filename(struct archive *a, const char *filename,
     size_t block_size)
 {
-       const char *filenames[2] = { filename, NULL };
+       const char *filenames[2];
+       filenames[0] = filename;
+       filenames[1] = NULL;
        return archive_read_open_filenames(a, filenames, block_size);
 }