Code

fixed some c++ style lines -- David Masterson
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 29 Jul 2008 05:08:46 +0000 (05:08 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 29 Jul 2008 05:08:46 +0000 (05:08 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1455 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/src/rrd_gfx.c
program/src/rrd_hw_update.c

index ca7f9ea1ed21bbf8ed0ef6310cfa86391a666c20..865d018f50ba0145997e658e9f81c9762b467500 100644 (file)
@@ -46,10 +46,13 @@ void gfx_dashed_line(
     double dash_off)
 {
     cairo_t  *cr = im->cr;
-    double    dashes[] = { dash_on, dash_off };
+    double    dashes[2];
     double    x = 0;
     double    y = 0;
 
+    dashes[0] = dash_on;
+    dashes[1] = dash_off;
+
     cairo_save(cr);
     cairo_new_path(cr);
     cairo_set_line_width(cr, width);
index 80da40a6ed5205ed3f632cd334095bb33f40f43b..9514380510ca1dd65ac537691704e5a95ef95c55 100644 (file)
@@ -48,6 +48,7 @@ int update_hwpredict(
     unsigned long dependent_rra_idx, seasonal_cdp_idx;
     unival   *coefs = rrd->cdp_prep[cdp_idx].scratch;
     rra_def_t *current_rra = &(rrd->rra_def[rra_idx]);
+    rrd_value_t seasonal_coef;
 
     /* save coefficients from current prediction */
     coefs[CDP_hw_last_intercept].u_val = coefs[CDP_hw_intercept].u_val;
@@ -58,7 +59,7 @@ int update_hwpredict(
     dependent_rra_idx = current_rra->par[RRA_dependent_rra_idx].u_cnt;
     seasonal_cdp_idx = dependent_rra_idx * (rrd->stat_head->ds_cnt) + ds_idx;
 
-    rrd_value_t seasonal_coef = (dependent_rra_idx < rra_idx)
+    seasonal_coef = (dependent_rra_idx < rra_idx)
         ? rrd->cdp_prep[seasonal_cdp_idx].scratch[CDP_hw_last_seasonal].u_val
         : rrd->cdp_prep[seasonal_cdp_idx].scratch[CDP_hw_seasonal].u_val;