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

Diff for /src/usr.bin/cvs/rcsnum.c between version 1.2 and 1.3

version 1.2, 2004/07/14 05:08:20 version 1.3, 2004/07/29 17:47:50
Line 188 
Line 188 
         const char *sp;          const char *sp;
         void *tmp;          void *tmp;
   
         if (!isdigit(*str))  
                 return (-1);  
   
         if (nump->rn_id == NULL) {          if (nump->rn_id == NULL) {
                 nump->rn_id = (u_int16_t *)malloc(sizeof(u_int16_t));                  nump->rn_id = (u_int16_t *)malloc(sizeof(u_int16_t));
                 if (nump->rn_id == NULL)                  if (nump->rn_id == NULL)
Line 200 
Line 197 
         nump->rn_len = 0;          nump->rn_len = 0;
         nump->rn_id[nump->rn_len] = 0;          nump->rn_id[nump->rn_len] = 0;
   
         for (sp = str; ; sp++) {          for (sp = str;; sp++) {
                 if (!isdigit(*sp) && (*sp != '.')) {                  if (!isdigit(*sp) && (*sp != '.'))
                         if (nump->rn_id[nump->rn_len] == 0) {  
                                 return (-1);  
                         }  
                         break;                          break;
                 }  
   
                 if (*sp == '.') {                  if (*sp == '.') {
                         nump->rn_len++;                          nump->rn_len++;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3