- int slash = pathlen && ! ISSLASH (path[pathlen - 1]);
- char *buffer = xmalloc (pathlen + slash + namesize);
- memcpy (buffer, path, pathlen);
- buffer[pathlen] = '/';
- memcpy (buffer + pathlen + slash, name, namesize);
+ int slash = file_name_len && ! ISSLASH (file_name[file_name_len - 1]);
+ char *buffer = xmalloc (file_name_len + slash + namesize);
+ memcpy (buffer, file_name, file_name_len);
+ buffer[file_name_len] = '/';
+ memcpy (buffer + file_name_len + slash, name, namesize);