Code

fix type conversion error (on windows) unsigned/signed affecting timestamps on rrd_dump.
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 25 Jan 2009 22:02:57 +0000 (22:02 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 25 Jan 2009 22:02:57 +0000 (22:02 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1744 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_dump.c
src/rrd_first.c

index b3dfcdca668dc1641b743fedc7572dc86c070e55..5fae397c488ff2fb4db1ec5d84b33649c8225ecc 100644 (file)
@@ -318,7 +318,7 @@ rrd_dump_r(const char *filename, char *outname)
                       +(rrd.rra_ptr[i].cur_row+1)
                       * rrd.stat_head->ds_cnt
                       * sizeof(rrd_value_t)),SEEK_SET);
-       timer = - (rrd.rra_def[i].row_cnt-1);
+       timer = - (long)(rrd.rra_def[i].row_cnt-1);
        ii=rrd.rra_ptr[i].cur_row;
        for(ix=0;ix<rrd.rra_def[i].row_cnt;ix++){           
            ii++;
index 174af502bc92765a5927c6c889af3a158c68a039..79c39c34db39958819b39ee317186512e918eb9f 100644 (file)
@@ -80,7 +80,7 @@ rrd_first_r(const char *filename, const int rraindex)
            rrd.stat_head->ds_cnt *
            sizeof(rrd_value_t)),
           SEEK_SET);
-    timer = - (rrd.rra_def[rraindex].row_cnt-1);
+    timer = - (long)(rrd.rra_def[rraindex].row_cnt-1);
     if (rrd.rra_ptr[rraindex].cur_row + 1 > rrd.rra_def[rraindex].row_cnt) {
       fseek(in_file,rra_start,SEEK_SET);
     }