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

Diff for /src/usr.bin/cvs/root.c between version 1.15 and 1.16

version 1.15, 2005/02/17 16:09:03 version 1.16, 2005/04/16 19:05:02
Line 260 
Line 260 
 struct cvsroot*  struct cvsroot*
 cvsroot_get(const char *dir)  cvsroot_get(const char *dir)
 {  {
           int l;
         size_t len;          size_t len;
         char rootpath[MAXPATHLEN], *rootstr, line[128];          char rootpath[MAXPATHLEN], *rootstr, line[128];
         FILE *fp;          FILE *fp;
Line 267 
Line 268 
         if (cvs_rootstr != NULL)          if (cvs_rootstr != NULL)
                 return cvsroot_parse(cvs_rootstr);                  return cvsroot_parse(cvs_rootstr);
   
         snprintf(rootpath, sizeof(rootpath), "%s/" CVS_PATH_ROOTSPEC, dir);          l = snprintf(rootpath, sizeof(rootpath), "%s/" CVS_PATH_ROOTSPEC, dir);
           if (l == -1 || l >= (int)sizeof(rootpath)) {
                   errno = ENAMETOOLONG;
                   cvs_log(LP_ERRNO, "%s", rootpath);
                   return (NULL);
           }
   
         fp = fopen(rootpath, "r");          fp = fopen(rootpath, "r");
         if (fp == NULL) {          if (fp == NULL) {
                 if (errno == ENOENT) {                  if (errno == ENOENT) {

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16