]> pilppa.com Git - libplp.git/commitdiff
fix possibility for unitialized variable
authorMika Laitio <lamikr@pilppa.org>
Thu, 16 Aug 2012 12:29:50 +0000 (15:29 +0300)
committerMika Laitio <lamikr@pilppa.org>
Thu, 16 Aug 2012 12:29:50 +0000 (15:29 +0300)
Signed-off-by: Mika Laitio <lamikr@pilppa.org>
src/StoreDay.cc

index 39a23005f7c3314cc237fdb5f409db3130e47e33..e57e1805f6b957020090a1cdda8343afc62ff4b8 100644 (file)
@@ -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();
        }