[lvm-devel] [PATCH 2/6] Intialize cmd in the struct alloc_handle
Zdenek Kabelac
zkabelac at redhat.com
Wed Jan 13 13:35:53 UTC 2010
Move initialization of the 'cmd' member of the struct alloc_handle
before the first potentional return.
Signed-off-by: Zdenek Kabelac <zkabelac at redhat.com>
---
lib/metadata/lv_manip.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 57c3d08..e54c453 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -566,11 +566,11 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd,
return NULL;
}
+ ah->cmd = cmd;
+
if (segtype_is_virtual(segtype))
return ah;
- ah->cmd = cmd;
-
if (!(ah->mem = dm_pool_create("allocation", 1024))) {
log_error("allocation pool creation failed");
return NULL;
--
1.6.6
More information about the lvm-devel
mailing list