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

Diff for /src/usr.bin/cvs/commit.c between version 1.101 and 1.102

version 1.101, 2007/01/26 21:48:17 version 1.102, 2007/01/31 21:07:35
Line 209 
Line 209 
         BUF *b, *d;          BUF *b, *d;
         int isnew;          int isnew;
         RCSNUM *head;          RCSNUM *head;
         int l, openflags, rcsflags;          int openflags, rcsflags;
         char rbuf[24], nbuf[24];          char rbuf[24], nbuf[24];
         CVSENTRIES *entlist;          CVSENTRIES *entlist;
         char attic[MAXPATHLEN], repo[MAXPATHLEN], rcsfile[MAXPATHLEN];          char attic[MAXPATHLEN], repo[MAXPATHLEN], rcsfile[MAXPATHLEN];
Line 248 
Line 248 
                                     "to be dead", cf->file_path);                                      "to be dead", cf->file_path);
   
                         cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN);                          cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN);
                         l = snprintf(rcsfile, MAXPATHLEN, "%s/%s%s",                          (void)xsnprintf(rcsfile, MAXPATHLEN, "%s/%s%s",
                             repo, cf->file_name, RCS_FILE_EXT);                              repo, cf->file_name, RCS_FILE_EXT);
                         if (l == -1 || l >= MAXPATHLEN)  
                                 fatal("cvs_commit_local: overflow");  
   
                         if (rename(cf->file_rpath, rcsfile) == -1)                          if (rename(cf->file_rpath, rcsfile) == -1)
                                 fatal("cvs_commit_local: failed to move %s "                                  fatal("cvs_commit_local: failed to move %s "
Line 358 
Line 356 
   
                 cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN);                  cvs_get_repository_path(cf->file_wd, repo, MAXPATHLEN);
   
                 l = snprintf(attic, MAXPATHLEN, "%s/%s", repo, CVS_PATH_ATTIC);                  (void)xsnprintf(attic, MAXPATHLEN, "%s/%s",
                 if (l == -1 || l >= MAXPATHLEN)                      repo, CVS_PATH_ATTIC);
                         fatal("cvs_commit_local: overflow");  
   
                 if (mkdir(attic, 0755) == -1 && errno != EEXIST)                  if (mkdir(attic, 0755) == -1 && errno != EEXIST)
                         fatal("cvs_commit_local: failed to create Attic");                          fatal("cvs_commit_local: failed to create Attic");
   
                 l = snprintf(attic, MAXPATHLEN, "%s/%s/%s%s", repo,                  (void)xsnprintf(attic, MAXPATHLEN, "%s/%s/%s%s", repo,
                     CVS_PATH_ATTIC, cf->file_name, RCS_FILE_EXT);                      CVS_PATH_ATTIC, cf->file_name, RCS_FILE_EXT);
                 if (l == -1 || l >= MAXPATHLEN)  
                         fatal("cvs_commit_local: overflow");  
   
                 if (rename(cf->file_rpath, attic) == -1)                  if (rename(cf->file_rpath, attic) == -1)
                         fatal("cvs_commit_local: failed to move %s to Attic",                          fatal("cvs_commit_local: failed to move %s to Attic",
Line 425 
Line 420 
 commit_desc_set(struct cvs_file *cf)  commit_desc_set(struct cvs_file *cf)
 {  {
         BUF *bp;          BUF *bp;
         int l, fd;          int fd;
         char desc_path[MAXPATHLEN], *desc;          char desc_path[MAXPATHLEN], *desc;
   
         l = snprintf(desc_path, MAXPATHLEN, "%s/%s%s",          (void)xsnprintf(desc_path, MAXPATHLEN, "%s/%s%s",
             CVS_PATH_CVSDIR, cf->file_name, CVS_DESCR_FILE_EXT);              CVS_PATH_CVSDIR, cf->file_name, CVS_DESCR_FILE_EXT);
         if (l == -1 || l >= MAXPATHLEN)  
                 fatal("commit_desc_set: overflow");  
   
         if ((fd = open(desc_path, O_RDONLY)) == -1)          if ((fd = open(desc_path, O_RDONLY)) == -1)
                 return;                  return;

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102