summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-06-20 12:05:00 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2012-08-23 14:38:48 +0200
commiteb08f8652125513761e83c324a2c7e706ccda791 (patch)
tree22048ca5170265b504d70c37f47f230ab74cbd87
parentc6f680ee4945f22670d133ba341bb670c1d0a474 (diff)
downloadlvm2-eb08f8652125513761e83c324a2c7e706ccda791.zip
lvm2-eb08f8652125513761e83c324a2c7e706ccda791.tar.gz
lvm2-eb08f8652125513761e83c324a2c7e706ccda791.tar.xz
cleanup: initilize percent to INVALID
Always initialize percent to INVALID value, in case target would have forget to setup this value somehow.
-rw-r--r--lib/activate/dev_manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index 43bcd49..c8a1e35 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -514,11 +514,11 @@ static int _percent_run(struct dev_manager *dm, const char *name,
struct lv_segment *seg = NULL;
struct segment_type *segtype;
int first_time = 1;
- percent_t percent;
+ percent_t percent = PERCENT_INVALID;
uint64_t total_numerator = 0, total_denominator = 0;
- *overall_percent = PERCENT_INVALID;
+ *overall_percent = percent;
if (!(dmt = _setup_task(name, dlid, event_nr,
wait ? DM_DEVICE_WAITEVENT : DM_DEVICE_STATUS, 0, 0)))