Diff for /src/usr.sbin/cron/cron/cron.c between versions 1.4 and 1.5

version 1.4, 2003/11/16 11:51:14 version 1.5, 2004/03/10 18:27:26
Line 135  main(int argc, char **argv) Line 135  main(int argc, char **argv)
 static void  static void
 run_reboot_jobs(cron_db *db)  run_reboot_jobs(cron_db *db)
 {  {
        register user           *u;        user *u;
        register entry          *e;        entry *e;
   
         for (u = db->head;  u != NULL;  u = u->next) {          for (u = db->head;  u != NULL;  u = u->next) {
                 for (e = u->crontab;  e != NULL;  e = e->next) {                  for (e = u->crontab;  e != NULL;  e = e->next) {
Line 152  run_reboot_jobs(cron_db *db) Line 152  run_reboot_jobs(cron_db *db)
 static void  static void
 cron_tick(cron_db *db)  cron_tick(cron_db *db)
 {  {
        static struct tm        lasttm;        static struct tm lasttm;
        static time_t   diff = 0, /* time difference in seconds from the last offset change */        static time_t diff;        /* delta time from the last offset change */
                difflimit = 0; /* end point for the time zone correction */        static time_t difflimit; /* end point for the time zone correction */
        struct tm       otztm; /* time in the old time zone */        struct tm otztm; /* time in the old time zone */
        int             otzminute, otzhour, otzdom, otzmonth, otzdow;        int otzminute, otzhour, otzdom, otzmonth, otzdow;
        register struct tm      *tm = localtime(&TargetTime);        struct tm *tm;
        register int                minute, hour, dom, month, dow;        int minute, hour, dom, month, dow;
        register user           *u;        user *u;
        register entry          *e;        entry *e;
   
           tm = localtime(&TargetTime);
         /* make 0-based values out of these so we can use them as indicies          /* make 0-based values out of these so we can use them as indicies
          */           */
         minute = tm->tm_min -FIRST_MINUTE;          minute = tm->tm_min -FIRST_MINUTE;
Line 296  cron_tick(cron_db *db) Line 297  cron_tick(cron_db *db)
 static void  static void
 cron_sync(void)  cron_sync(void)
 {  {
        register struct tm      *tm;        struct tm *tm;
   
         TargetTime = time((time_t*)0);          TargetTime = time((time_t*)0);
         tm = localtime(&TargetTime);          tm = localtime(&TargetTime);

Removed from v.1.4  
changed lines
  Added in v.1.5