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

Diff for /src/usr.bin/rcs/ci.c between version 1.43 and 1.44

version 1.43, 2005/10/17 22:24:18 version 1.44, 2005/10/18 01:10:28
Line 71 
Line 71 
 int  int
 checkin_main(int argc, char **argv)  checkin_main(int argc, char **argv)
 {  {
           int found, notlocked;
         int i, ch, force, lkmode, interactive, rflag, status, symforce;          int i, ch, force, lkmode, interactive, rflag, status, symforce;
         mode_t fmode;          mode_t fmode;
         time_t date;          time_t date;
Line 263 
Line 264 
                  * Check for a lock belonging to this user. If none,                   * Check for a lock belonging to this user. If none,
                  * abort check-in.                   * abort check-in.
                  */                   */
                 if (TAILQ_EMPTY(&(file->rf_locks))) {                  found = 0;
                         cvs_log(LP_ERR, "%s: no lock set by %s", fpath,                  notlocked = 1;
                             username);                  if (!TAILQ_EMPTY(&(file->rf_locks))) {
                         status = 1;  
                         rcs_close(file);  
                         continue;  
                 } else {  
                         TAILQ_FOREACH(lkp, &(file->rf_locks), rl_list) {                          TAILQ_FOREACH(lkp, &(file->rf_locks), rl_list) {
                                 if ((strcmp(lkp->rl_name, username) != 0)                                  if (!strcmp(lkp->rl_name, username))
                                     && (rcsnum_cmp(lkp->rl_num, frev, 0))) {                                          notlocked = 0;
                                         cvs_log(LP_ERR,  
                                             "%s: no lock set by %s", fpath,                                  if (!strcmp(lkp->rl_name, username) &&
                                             username);                                      !rcsnum_cmp(lkp->rl_num, frev, 0)) {
                                         status = 1;                                          found = 1;
                                         rcs_close(file);                                          break;
                                         continue;  
                                 }                                  }
                         }                          }
                   }
   
                   if (found == 0 && notlocked == 0) {
                           cvs_log(LP_ERR, "no locks set for '%s'", username);
                           status = 1;
                           rcs_close(file);
                           continue;
                 }                  }
   
                 /*                  /*

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44