From: Mika Laitio Date: Thu, 16 Aug 2012 12:29:50 +0000 (+0300) Subject: fix possibility for unitialized variable X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e8388e36ba07a332022dfd206c633428d020b303;p=libplp.git fix possibility for unitialized variable Signed-off-by: Mika Laitio --- diff --git a/src/StoreDay.cc b/src/StoreDay.cc index 39a2300..e57e180 100644 --- a/src/StoreDay.cc +++ b/src/StoreDay.cc @@ -225,6 +225,7 @@ plp::DataRange *StoreDay::get_sum(EnumSummaryPeriod period_type_param) { ret_val = NULL; calc = NULL; limit_d = NULL; + succ = true; frq_sec = get_summary_period_as_freq_seconds(period_type_param); if (store_data == NULL) { succ = load(); @@ -300,6 +301,7 @@ plp::DataRange *StoreDay::get_mean(EnumSummaryPeriod period_type_param) { calc = NULL; limit_d = NULL; d_count = 1; + succ = true; frq_sec = get_summary_period_as_freq_seconds(period_type_param); if (store_data == NULL) { succ = load(); @@ -381,6 +383,7 @@ plp::DataRange *StoreDay::get_delta(EnumSummaryPeriod period_type_param) { calc1 = NULL; calc2 = NULL; limit_d = NULL; + succ = true; frq_sec = get_summary_period_as_freq_seconds(period_type_param); if (store_data == NULL) { succ = load(); @@ -472,6 +475,7 @@ plp::DataRange *StoreDay::get_max_or_min(EnumSummaryPeriod period_type_param, bo calc = NULL; limit_d = NULL; frq_sec = get_summary_period_as_freq_seconds(period_type_param); + succ = true; if (store_data == NULL) { succ = load(); }