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

Diff for /src/usr.bin/newsyslog/newsyslog.c between version 1.84 and 1.85

version 1.84, 2007/03/20 03:50:39 version 1.85, 2009/09/10 13:03:35
Line 1333 
Line 1333 
 }  }
   
 /*  /*
  * Move a file using rename(2) is possible and copying if not.   * Move a file using rename(2) if possible and copying if not.
  */   */
 int  int
 movefile(char *from, char *to, uid_t owner_uid, gid_t group_gid, mode_t perm)  movefile(char *from, char *to, uid_t owner_uid, gid_t group_gid, mode_t perm)
Line 1369 
Line 1369 
         if (ferror(src))          if (ferror(src))
                 err(1, "error reading from %s", from);                  err(1, "error reading from %s", from);
         if ((fclose(src)) != 0)          if ((fclose(src)) != 0)
                 err(1, "can't fclose %s", to);  
         if ((fclose(dst)) != 0)  
                 err(1, "can't fclose %s", from);                  err(1, "can't fclose %s", from);
           if ((fclose(dst)) != 0)
                   err(1, "can't fclose %s", to);
         if ((unlink(from)) != 0)          if ((unlink(from)) != 0)
                 err(1, "can't unlink %s", from);                  err(1, "can't unlink %s", from);
   

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85