In server_last_modified(), rename negative to negative_delta.
authorFabian Keil <fk@fabiankeil.de>
Mon, 1 Jun 2009 14:18:04 +0000 (14:18 +0000)
committerFabian Keil <fk@fabiankeil.de>
Mon, 1 Jun 2009 14:18:04 +0000 (14:18 +0000)
parsers.c

index aca606e..b2b7085 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -1,4 +1,4 @@
-const char parsers_rcs[] = "$Id: parsers.c,v 1.166 2009/05/28 18:42:30 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.167 2009/05/28 21:13:34 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/parsers.c,v $
@@ -2230,7 +2230,6 @@ static jb_err server_last_modified(struct client_state *csp, char **header)
 #endif
    struct tm *timeptr = NULL;
    time_t now, last_modified;                  
-   long int rtime;
    long int days, hours, minutes, seconds;
    
    /*
@@ -2294,19 +2293,21 @@ static jb_err server_last_modified(struct client_state *csp, char **header)
       }
       else
       {
-         rtime = (long int)difftime(now, last_modified);
+         long int rtime = (long int)difftime(now, last_modified);
          if (rtime)
          {
-            int negative = 0;
+            const int negative_delta = (rtime < 0);
 
-            if (rtime < 0)
+            if (negative_delta)
             {
                rtime *= -1; 
-               negative = 1;
                log_error(LOG_LEVEL_HEADER, "Server time in the future.");
             }
             rtime = pick_from_range(rtime);
-            if (negative) rtime *= -1;
+            if (negative_delta)
+            {
+               rtime *= -1;
+            }
             last_modified += rtime;
 #ifdef HAVE_GMTIME_R
             timeptr = gmtime_r(&last_modified, &gmt);