-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 $
#endif
struct tm *timeptr = NULL;
time_t now, last_modified;
- long int rtime;
long int days, hours, minutes, seconds;
/*
}
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);