From: Tobias Oetiker Date: Sun, 13 Aug 2006 16:07:36 +0000 (+0000) Subject: can't define new variables in the middle of the code (unless everyone was using c99... X-Git-Tag: 1.2.16~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed14a0ec8e363168d9d80c2cc910767a60da2903;p=thirdparty%2Frrdtool-1.x.git can't define new variables in the middle of the code (unless everyone was using c99 which is not the case) git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@870 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_tool.c b/src/rrd_tool.c index cf29cd98..f393f860 100644 --- a/src/rrd_tool.c +++ b/src/rrd_tool.c @@ -689,12 +689,12 @@ int HandleInputLine(int argc, char **argv, FILE* out) printf (" <%s>", DATA_ROW_TAG); printf ("<%s>%lu", 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", vtag,vtag);