]> sourceware.org Git - lvm2.git/commitdiff
cleanup: init of lcp
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 31 Oct 2014 09:25:05 +0000 (10:25 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 3 Nov 2014 13:19:34 +0000 (14:19 +0100)
Use struct initializer instead of memset().

tools/lvcreate.c

index 2cbfbe502c0056682d1cb69f83aff45543cafa80..f6786a8116c7d6870a6c9214eb4d762cb4442965 100644 (file)
@@ -346,7 +346,7 @@ static int _update_extents_params(struct volume_group *vg,
            (vg->free_count < lp->extents - size_rest + (lp->stripes * stripesize_extents))) {
                log_print_unless_silent("Rounding size (%d extents) down to stripe boundary "
                                        "size (%d extents)", lp->extents,
-                         lp->extents - size_rest);
+                                       lp->extents - size_rest);
                lp->extents = lp->extents - size_rest;
        }
 
@@ -625,7 +625,6 @@ static int _lvcreate_params(struct cmd_context *cmd,
        int only_linear = 0;
        int mirror_default_cfg;
 
-       memset(lcp, 0, sizeof(*lcp));
        dm_list_init(&lp->tags);
        lp->target_attr = ~0;
        lp->yes = arg_count(cmd, yes_ARG);
@@ -1413,7 +1412,7 @@ int lvcreate(struct cmd_context *cmd, int argc, char **argv)
                .major = -1,
                .minor = -1,
        };
-       struct lvcreate_cmdline_params lcp;
+       struct lvcreate_cmdline_params lcp = { 0 };
        struct volume_group *vg;
 
        if (!_lvcreate_params(cmd, argc, argv, &lp, &lcp)) {
This page took 0.033796 seconds and 5 git commands to generate.