* [PATCH 1 of 4] LVM: cleanup 1
@ 2011-01-10 20:56 Jonathan Brassow
2011-01-11 10:26 ` Zdenek Kabelac
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Brassow @ 2011-01-10 20:56 UTC (permalink / raw)
To: lvm-devel
Patch name: lvm-cleanup-1.patch
lvcreate() does a 'memset(&lp, 0, sizeof(lp))', which is done by very
next function called. No need to do it twice.
Index: LVM2/tools/lvcreate.c
===================================================================
--- LVM2.orig/tools/lvcreate.c
+++ LVM2/tools/lvcreate.c
@@ -538,8 +538,6 @@ int lvcreate(struct cmd_context *cmd, in
struct lvcreate_cmdline_params lcp;
struct volume_group *vg;
- memset(&lp, 0, sizeof(lp));
-
if (!_lvcreate_params(&lp, &lcp, cmd, argc, argv))
return EINVALID_CMD_LINE;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1 of 4] LVM: cleanup 1
2011-01-10 20:56 [PATCH 1 of 4] LVM: cleanup 1 Jonathan Brassow
@ 2011-01-11 10:26 ` Zdenek Kabelac
0 siblings, 0 replies; 2+ messages in thread
From: Zdenek Kabelac @ 2011-01-11 10:26 UTC (permalink / raw)
To: lvm-devel
Dne 10.1.2011 21:56, Jonathan Brassow napsal(a):
> Patch name: lvm-cleanup-1.patch
>
> lvcreate() does a 'memset(&lp, 0, sizeof(lp))', which is done by very
> next function called. No need to do it twice.
>
> Index: LVM2/tools/lvcreate.c
> ===================================================================
> --- LVM2.orig/tools/lvcreate.c
> +++ LVM2/tools/lvcreate.c
> @@ -538,8 +538,6 @@ int lvcreate(struct cmd_context *cmd, in
> struct lvcreate_cmdline_params lcp;
> struct volume_group *vg;
>
> - memset(&lp, 0, sizeof(lp));
> -
> if (!_lvcreate_params(&lp, &lcp, cmd, argc, argv))
> return EINVALID_CMD_LINE;
Ack
Valid and we already do the same with lcp.
Zdenek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-11 10:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-10 20:56 [PATCH 1 of 4] LVM: cleanup 1 Jonathan Brassow
2011-01-11 10:26 ` Zdenek Kabelac
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.