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

Diff for /src/usr.bin/cvs/remove.c between version 1.40 and 1.41

version 1.40, 2006/01/02 08:11:56 version 1.41, 2006/01/25 08:15:05
Line 128 
Line 128 
 static int  static int
 cvs_remove_local(CVSFILE *cf, void *arg)  cvs_remove_local(CVSFILE *cf, void *arg)
 {  {
         int existing, l, removed;          int existing, removed;
         char buf[MAXPATHLEN], fpath[MAXPATHLEN];          char buf[MAXPATHLEN], fpath[MAXPATHLEN];
         CVSENTRIES *entf;          CVSENTRIES *entf;
         struct cvs_ent *ent;          struct cvs_ent *ent;
Line 163 
Line 163 
                 if (cvs_ent_remove(entf, cf->cf_name, 0) == -1)                  if (cvs_ent_remove(entf, cf->cf_name, 0) == -1)
                         return (CVS_EX_FILE);                          return (CVS_EX_FILE);
   
                 l = snprintf(buf, sizeof(buf), "%s/%s%s",                  if (strlcpy(buf, CVS_PATH_CVSDIR, sizeof(buf)) >= sizeof(buf) ||
                     CVS_PATH_CVSDIR, cf->cf_name, CVS_DESCR_FILE_EXT);                      strlcat(buf, "/", sizeof(buf)) >= sizeof(buf) ||
                 if (l == -1 || l >= (int)sizeof(buf)) {                      strlcat(buf, cf->cf_name, sizeof(buf)) >= sizeof(buf) ||
                         errno = ENAMETOOLONG;                      strlcat(buf, CVS_DESCR_FILE_EXT,
                         cvs_log(LP_ERRNO, "%s", buf);                      sizeof(buf)) >= sizeof(buf))
                         return (CVS_EX_DATA);                          fatal("cvs_remove_local: path truncation");
                 }  
   
                 if (cvs_unlink(buf) == -1)                  if (cvs_unlink(buf) == -1)
                         return (CVS_EX_FILE);                          return (CVS_EX_FILE);

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41