[lvm-devel] [PATCH 1 of 4] LVM: cleanup 1

Jonathan Brassow jbrassow at redhat.com
Mon Jan 10 20:56:27 UTC 2011


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;
 




More information about the lvm-devel mailing list