aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/file/copydir.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-01-18 08:55:26 +0900
committerMichael Paquier <michael@paquier.xyz>2023-01-18 08:55:26 +0900
commit2f31f405e1fa561db27e8dc6f7f3cb3dbd8c0c4f (patch)
tree954e09d35b777323ef07cab489dc75cbe994927d /src/backend/storage/file/copydir.c
parent09d465c397165f99c37e9002a4e7b281111d2580 (diff)
downloadpostgresql-2f31f405e1fa561db27e8dc6f7f3cb3dbd8c0c4f.tar.gz
postgresql-2f31f405e1fa561db27e8dc6f7f3cb3dbd8c0c4f.zip
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
Diffstat (limited to 'src/backend/storage/file/copydir.c')
-rw-r--r--src/backend/storage/file/copydir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/storage/file/copydir.c b/src/backend/storage/file/copydir.c
index 7782e266772..e04bc3941ae 100644
--- a/src/backend/storage/file/copydir.c
+++ b/src/backend/storage/file/copydir.c
@@ -34,7 +34,7 @@
* a directory or a regular file is ignored.
*/
void
-copydir(char *fromdir, char *todir, bool recurse)
+copydir(const char *fromdir, const char *todir, bool recurse)
{
DIR *xldir;
struct dirent *xlde;
@@ -114,7 +114,7 @@ copydir(char *fromdir, char *todir, bool recurse)
* copy one file
*/
void
-copy_file(char *fromfile, char *tofile)
+copy_file(const char *fromfile, const char *tofile)
{
char *buffer;
int srcfd;