mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Constify the arguments of copydir.h functions
This makes sure that the internal logic of these functions does not attempt to change the value of the arguments constified, and it removes one unconstify() in basic_archive.c. Author: Nathan Bossart Reviewed-by: Andrew Dunstan, Peter Eisentraut Discussion: https://postgr.es/m/20230114231126.GA2580330@nathanxps13
This commit is contained in:
@ -275,7 +275,7 @@ basic_archive_file_internal(const char *file, const char *path)
|
||||
* Copy the file to its temporary destination. Note that this will fail
|
||||
* if temp already exists.
|
||||
*/
|
||||
copy_file(unconstify(char *, path), temp);
|
||||
copy_file(path, temp);
|
||||
|
||||
/*
|
||||
* Sync the temporary file to disk and move it to its final destination.
|
||||
|
Reference in New Issue
Block a user