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

Diff for /src/usr.bin/less/lesskey.c between version 1.3 and 1.4

version 1.3, 2001/11/19 19:02:14 version 1.4, 2003/04/05 01:03:35
Line 223 
Line 223 
         char *filename;          char *filename;
 {  {
         char *pathname;          char *pathname;
           size_t len;
   
         pathname = calloc(strlen(dirname) + strlen(filename) + 2, sizeof(char));          len = strlen(dirname) + strlen(filename) + 2;
         strcpy(pathname, dirname);          pathname = calloc(len, sizeof(char));
           strlcpy(pathname, dirname, len);
 #if MSOFTC || OS2  #if MSOFTC || OS2
         strcat(pathname, "\\");          strlcat(pathname, "\\", len);
 #else  #else
         strcat(pathname, "/");          strlcat(pathname, "/", len);
 #endif  #endif
         strcat(pathname, filename);          strlcat(pathname, filename, len);
         return (pathname);          return (pathname);
 }  }
   

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