[BACK]Return to util.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ftp

Diff for /src/usr.bin/ftp/util.c between version 1.76 and 1.77

version 1.76, 2015/12/09 17:55:42 version 1.77, 2016/03/16 15:41:11
Line 764 
Line 764 
         char buf[512];          char buf[512];
   
         if (flag == -1) {          if (flag == -1) {
                 (void)gettimeofday(&start, (struct timezone *)0);                  (void)gettimeofday(&start, NULL);
                 lastupdate = start;                  lastupdate = start;
                 lastsize = restart_point;                  lastsize = restart_point;
         }          }
         (void)gettimeofday(&now, (struct timezone *)0);          (void)gettimeofday(&now, NULL);
         if (!progress || filesize < 0)          if (!progress || filesize < 0)
                 return;                  return;
         cursize = bytes + restart_point;          cursize = bytes + restart_point;
Line 925 
Line 925 
         if (!verbose && !siginfo)          if (!verbose && !siginfo)
                 return;                  return;
   
         (void)gettimeofday(&now, (struct timezone *)0);          (void)gettimeofday(&now, NULL);
         timersub(&now, &start, &td);          timersub(&now, &start, &td);
         elapsed = td.tv_sec + (td.tv_usec / 1000000.0);          elapsed = td.tv_sec + (td.tv_usec / 1000000.0);
         bs = bytes / (elapsed == 0.0 ? 1 : elapsed);          bs = bytes / (elapsed == 0.0 ? 1 : elapsed);

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.77