1
0
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:
Michael Paquier
2023-01-18 08:55:26 +09:00
parent 09d465c397
commit 2f31f405e1
3 changed files with 5 additions and 5 deletions

View File

@ -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.