From: oetiker Date: Mon, 17 Dec 2001 12:48:43 +0000 (+0000) Subject: fix overflow error ... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9b1e0d7c693dd1fdff796020083bd759595be53c;p=rrdtool-all.git fix overflow error ... git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@57 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_fetch.c b/program/src/rrd_fetch.c index e82eb3ce..3bb97085 100644 --- a/program/src/rrd_fetch.c +++ b/program/src/rrd_fetch.c @@ -5,8 +5,11 @@ ***************************************************************************** * $Id$ * $Log$ - * Revision 1.1 2001/02/25 22:25:05 oetiker - * Initial revision + * Revision 1.2 2001/12/17 12:48:43 oetiker + * fix overflow error ... + * + * Revision 1.1.1.1 2001/02/25 22:25:05 oetiker + * checkin * *****************************************************************************/ @@ -257,8 +260,8 @@ rrd_fetch_fn( - (rrd.live_head->last_up % *step)); rra_start_time = (rra_end_time - ( *step * (rrd.rra_def[chosen_rra].row_cnt-1))); - start_offset = (*start - rra_start_time) / (long)*step; - end_offset = (rra_end_time - *end ) / (long)*step; + start_offset =(long)(*start - rra_start_time) / (long)*step; + end_offset = (long)(rra_end_time - *end ) / (long)*step; #ifdef DEBUG fprintf(stderr,"rra_start %lu, rra_end %lu, start_off %li, end_off %li\n", rra_start_time,rra_end_time,start_offset,end_offset);