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

Diff for /src/usr.bin/rcs/rcsutil.c between version 1.36 and 1.37

version 1.36, 2010/09/08 15:15:50 version 1.37, 2010/10/20 19:53:53
Line 50 
Line 50 
         struct stat st;          struct stat st;
         time_t mtime;          time_t mtime;
   
         if (fstat(file->rf_fd, &st) == -1) {          if (file->rf_file == NULL)
                   return (-1);
   
           if (fstat(fileno(file->rf_file), &st) == -1) {
                 warn("%s", file->rf_path);                  warn("%s", file->rf_path);
                 return (-1);                  return (-1);
         }          }
Line 70 
Line 73 
 {  {
         static struct timeval tv[2];          static struct timeval tv[2];
   
         if (mtime == -1)          if (file->rf_file == NULL || mtime == -1)
                 return;                  return;
   
         tv[0].tv_sec = mtime;          tv[0].tv_sec = mtime;
         tv[1].tv_sec = tv[0].tv_sec;          tv[1].tv_sec = tv[0].tv_sec;
   
         if (futimes(file->rf_fd, tv) == -1)          if (futimes(fileno(file->rf_file), tv) == -1)
                 err(1, "utimes");                  err(1, "utimes");
 }  }
   

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37