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

Diff for /src/usr.bin/rcs/rcsprog.c between version 1.80 and 1.81

version 1.80, 2006/03/21 02:45:09 version 1.81, 2006/03/21 02:50:15
Line 319 
Line 319 
                         break;                          break;
                 }                  }
         }          }
         xfree(suffixes);  
   
         /*          /*
          * If `ret' is still NULL no RCS file with any extension exists           * If `ret' is still NULL no RCS file with any extension exists
Line 327 
Line 326 
          */           */
         if (ret == NULL) {          if (ret == NULL) {
                 /*                  /*
                  * XXX - We shouldn't need to do strsep again,                   * `suffixes' should now be NUL separated, so the first
                  * suffixes should now be NUL separated.                   * extension can be read just by reading `suffixes'.
                  */                   */
                 next = suffixes = xstrdup(rcs_suffixes);                  if (strlcat(rcspath, suffixes, sizeof(rcspath)) >= sizeof(rcspath)) {
                 /* Get first extension again. */  
                 if ((ext = strsep(&next, "/")) == NULL) {  
                         xfree(suffixes);                          xfree(suffixes);
                         return (NULL);                          return (NULL);
                 }                  }
                 if (strlcat(rcspath, ext, sizeof(rcspath)) >= sizeof(rcspath)) {  
                         xfree(suffixes);  
                         return (NULL);  
                 }  
                 ret = xstrdup(rcspath);                  ret = xstrdup(rcspath);
                 xfree(suffixes);  
         }          }
   
           xfree(suffixes);
         return (ret);          return (ret);
 }  }
   

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.81