Skip to contentSkip to conversation

master - lvm2api: use fully initilized struct

PATCH Zdenek Kabelac 1 participant 1 message Nov 13, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7278556c768ae418b03873bd5d9e921e13ce79e8
Commit:        7278556c768ae418b03873bd5d9e921e13ce79e8
Parent:        49e3fd1ce8d0b1023f553673e76b49e65348878f
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Nov 13 17:42:09 2014 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Nov 13 17:49:41 2014 +0100

lvm2api: use fully initilized struct

Don't pass partially initialized struct.

---
 python/liblvm.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
python/liblvm.c +4 -3
index 1b0942d..3828f27 100644
@@ -324,9 +324,10 @@ static PyObject *_liblvm_lvm_pv_remove(PyObject *self, PyObject *arg)
 static int _set_pv_numeric_prop(pv_create_params_t pv_params, const char *name,
 								unsigned long long value)
 {
-	struct lvm_property_value prop_value;
-	prop_value.is_integer = 1;
-	prop_value.value.integer = value;
+	struct lvm_property_value prop_value = {
+		.is_integer = 1,
+		.value.integer = value,
+	};
 
 	return lvm_pv_params_set_property(pv_params, name, &prop_value);
 }