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

Diff for /src/usr.bin/rpcgen/rpc_main.c between version 1.16 and 1.17

version 1.16, 2003/04/14 04:51:28 version 1.17, 2003/04/14 19:45:59
Line 224 
Line 224 
         char *file;          char *file;
         char *res;          char *res;
         char *p;          char *p;
         size_t len;  
   
         if ((file = strrchr(path, '/')) == NULL)          if ((file = strrchr(path, '/')) == NULL)
                 file = path;                  file = path;
         else          else
                 file++;                  file++;
   
         len = strlen(file) + strlen(ext) + 1;          res = alloc(strlen(file) + strlen(ext) + 1);
         res = alloc(len);  
         if (res == NULL) {          if (res == NULL) {
                 fprintf(stderr, "could not allocate memory\n");                  fprintf(stderr, "could not allocate memory\n");
                 exit(1);                  exit(1);
Line 240 
Line 238 
         p = strrchr(file, '.');          p = strrchr(file, '.');
         if (p == NULL)          if (p == NULL)
                 p = file + strlen(file);                  p = file + strlen(file);
         (void) strlcpy(res, file, len);          (void) strcpy(res, file);
         (void) strlcpy(res, ext, len - (p - file));          (void) strcpy(res + (p - file), ext);
         return (res);          return (res);
 }  }
   

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