Code

can't define new variables in the middle of the code (unless everyone was using c99...
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 13 Aug 2006 16:07:36 +0000 (16:07 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 13 Aug 2006 16:07:36 +0000 (16:07 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@870 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/src/rrd_tool.c

index cf29cd983d4c7d5df2333880f87cffd83fde666c..f393f860d6f8749f69550b2e8df85c81f754cf4f 100644 (file)
@@ -689,12 +689,12 @@ int HandleInputLine(int argc, char **argv, FILE* out)
            printf ("    <%s>", DATA_ROW_TAG);
            printf ("<%s>%lu</%s>", COL_TIME_TAG, ti, COL_TIME_TAG);
            for (j = 0; j < col_cnt; j++) {
+             rrd_value_t newval = DNAN;
               if (enumds == 1)
                snprintf(vtag,15,"%s%lu", COL_DATA_TAG, j);
              else
                snprintf(vtag,15,"%s",COL_DATA_TAG);
               
-             rrd_value_t newval = DNAN;
              newval = *ptr;
              if(isnan(newval)){
                 printf("<%s>NaN</%s>", vtag,vtag);