cleared const conversation warning on safe snipet

This commit is contained in:
anon 2023-11-24 16:35:15 +01:00
parent 579a211b1a
commit 64036d4b61

View File

@ -120,14 +120,13 @@ static bool samelist(FILE *oldrefs, char **names, int count) {
}
/* create the file name(s) used for a new cross-referene */
void setup_build_filenames(char *reffile) {
char *path; /* file pathname */
char *s; /* pointer to basename in path */
path = malloc(strlen(reffile) + 10u);
strcpy(path, reffile);
s = basename(path);
s = (char *)basename(path); // this is save because the returned pointer is inside $path, and we know we can edit it
*s = '\0';
strcat(path, "n");
++s;