cleared const conversation warning on safe snipet
This commit is contained in:
parent
579a211b1a
commit
64036d4b61
@ -120,14 +120,13 @@ static bool samelist(FILE *oldrefs, char **names, int count) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* create the file name(s) used for a new cross-referene */
|
/* create the file name(s) used for a new cross-referene */
|
||||||
|
|
||||||
void setup_build_filenames(char *reffile) {
|
void setup_build_filenames(char *reffile) {
|
||||||
char *path; /* file pathname */
|
char *path; /* file pathname */
|
||||||
char *s; /* pointer to basename in path */
|
char *s; /* pointer to basename in path */
|
||||||
|
|
||||||
path = malloc(strlen(reffile) + 10u);
|
path = malloc(strlen(reffile) + 10u);
|
||||||
strcpy(path, reffile);
|
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';
|
*s = '\0';
|
||||||
strcat(path, "n");
|
strcat(path, "n");
|
||||||
++s;
|
++s;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user