mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
Drop const from the output of filename_set_extension()
filename_set_extension() always returns a newly allocated string buffer, drop the "const" from the return type. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
e47a62ed4d
commit
7b4e77dae2
2 changed files with 4 additions and 3 deletions
|
|
@ -368,9 +368,10 @@ static inline const char *nasm_digit_chars(bool ucase)
|
|||
int32_t seg_alloc(void);
|
||||
|
||||
/*
|
||||
* Add/replace or remove an extension to the end of a filename
|
||||
* Add/replace or remove an extension to the end of a filename;
|
||||
* returns a newly allocated buffer with the modified filename.
|
||||
*/
|
||||
const char *filename_set_extension(const char *inname, const char *extension);
|
||||
char *filename_set_extension(const char *inname, const char *extension);
|
||||
|
||||
/*
|
||||
* Utility macros...
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ char *nasm_catfile(const char *dir, const char *file)
|
|||
* string buffer. If the extension is not an empty string, the first
|
||||
* character is replaced by the appropriate extsep for the filesystem.
|
||||
*/
|
||||
const char *filename_set_extension(const char *inname, const char *extension)
|
||||
char *filename_set_extension(const char *inname, const char *extension)
|
||||
{
|
||||
const char *nulp, *ep, *p;
|
||||
char *outname, *q;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue