From: oetiker Date: Mon, 17 Dec 2001 12:48:43 +0000 (+0000) Subject: fix overflow error ... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2befaf847706f240b4b213cbc343b4916ec472e7;p=rrdtool.git fix overflow error ... git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@57 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c index e82eb3c..3bb9708 100644 --- a/src/rrd_fetch.c +++ b/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);