Code

Imported upstream version 1.2.28.
[pkg-rrdtool.git] / src / rrd_fetch.c
index 82d35f374b75450175c5e9c34d2bbc4ab4b033a3..033629edb2fa68274911c6de7e166bc47ed9f4d6 100644 (file)
@@ -1,9 +1,9 @@
 /*****************************************************************************
- * RRDtool 1.2.27  Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.2.28  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_fetch.c  read date from an rrd to use for further processing
  *****************************************************************************
- * $Id: rrd_fetch.c 1286 2008-02-17 10:08:10Z oetiker $
+ * $Id: rrd_fetch.c 1450 2008-07-23 13:45:41Z oetiker $
  * $Log$
  * Revision 1.8  2004/05/18 18:53:03  oetiker
  * big spell checking patch -- slif@bellsouth.net
@@ -259,8 +259,7 @@ fprintf(stderr,"Considering: start %10lu end %10lu step %5lu ",
            tmp_step_diff = labs(*step - (rrd.stat_head->pdp_step
                                           * rrd.rra_def[i].pdp_cnt));
            /* best full match */
-           if(cal_end >= *end 
-              && cal_start <= *start){
+           if(cal_start <= *start){
                if (first_full || (tmp_step_diff < best_full_step_diff)){
                    first_full=0;
                    best_full_step_diff = tmp_step_diff;
@@ -279,8 +278,6 @@ fprintf(stderr,"full match, not best\n");
                tmp_match = full_match;
                if (cal_start>*start)
                    tmp_match -= (cal_start-*start);
-               if (cal_end<*end)
-                   tmp_match -= (*end-cal_end);                
                if (first_part ||
                     (best_match < tmp_match) ||
                     (best_match == tmp_match &&