]> wimlib.net Git - wimlib/commitdiff
Replace unnamed union initializers
authorEric Biggers <ebiggers3@gmail.com>
Tue, 29 Apr 2014 04:17:28 +0000 (23:17 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 29 Apr 2014 04:17:28 +0000 (23:17 -0500)
programs/imagex.c
src/update_image.c

index 43ca5d2e08f0454d6effac68f00c89bc6baec350..644a2babdea58bad76431405ebd636dbb814db2a 100644 (file)
@@ -3870,16 +3870,14 @@ imagex_update(int argc, tchar **argv, int cmd)
                /* --wimboot-config=FILE is short for an
                 * "add FILE /Windows/System32/WimBootCompress.ini" command.
                 */
-               struct wimlib_update_command cmd = {
-                       .op = WIMLIB_UPDATE_OP_ADD,
-                       .add = {
-                               .fs_source_path = wimboot_config,
-                               .wim_target_path =
-                                       T("/Windows/System32/WimBootCompress.ini"),
-                               .config_file = NULL,
-                               .add_flags = 0,
-                       },
-               };
+               struct wimlib_update_command cmd;
+
+               cmd.op = WIMLIB_UPDATE_OP_ADD;
+               cmd.add.fs_source_path = wimboot_config;
+               cmd.add.wim_target_path = T("/Windows/System32/WimBootCompress.ini");
+               cmd.add.config_file = NULL;
+               cmd.add.add_flags = 0;
+
                ret = wimlib_update_image(wim, image, &cmd, 1,
                                          update_flags, imagex_progress_func);
                if (ret)
index 06a6ad30261434a3a6a0107602b29831bb2b07ef..5dc32fc4c1e1280a7dd4e133c2998dab57a5b865 100644 (file)
@@ -328,15 +328,13 @@ static int
 journaled_link(struct update_command_journal *j,
               struct wim_dentry *subject, struct wim_dentry *parent)
 {
-       struct update_primitive prim = {
-               .type = LINK_DENTRY,
-               .link = {
-                       .subject = subject,
-                       .parent = parent,
-               },
-       };
+       struct update_primitive prim;
        int ret;
 
+       prim.type = LINK_DENTRY;
+       prim.link.subject = subject;
+       prim.link.parent = parent;
+
        ret = record_update_primitive(j, prim);
        if (ret)
                return ret;
@@ -356,21 +354,18 @@ journaled_link(struct update_command_journal *j,
 static int
 journaled_unlink(struct update_command_journal *j, struct wim_dentry *subject)
 {
-       int ret;
        struct wim_dentry *parent;
+       struct update_primitive prim;
+       int ret;
 
        if (dentry_is_root(subject))
                parent = NULL;
        else
                parent = subject->parent;
 
-       struct update_primitive prim = {
-               .type = UNLINK_DENTRY,
-               .link = {
-                       .subject = subject,
-                       .parent = parent,
-               },
-       };
+       prim.type = UNLINK_DENTRY;
+       prim.link.subject = subject;
+       prim.link.parent = parent;
 
        ret = record_update_primitive(j, prim);
        if (ret)