summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-09-16 07:23:50 +0200
committerPeter Eisentraut <peter@eisentraut.org>2025-09-16 07:27:32 +0200
commitbce18ef3c67be63ad2dd8d585260dcb813f5a525 (patch)
tree854ca589cf73fdd8a59cf0748633520bff4ff7a3 /src
parent66dabc06b1b0aaadfd5be640a2e3efbeea0fcaf5 (diff)
Fix incorrect const qualifier
Commit 7202d72787d added in passing some const qualifiers, but the one on the postmaster_child_launch() startup_data argument was incorrect, because the function itself modifies the pointed-to data. This is hidden from the compiler because of casts. The qualifiers on the functions called by postmaster_child_launch() are still correct.
Diffstat (limited to 'src')
-rw-r--r--src/backend/postmaster/launch_backend.c2
-rw-r--r--src/include/postmaster/postmaster.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/postmaster/launch_backend.c b/src/backend/postmaster/launch_backend.c
index c5ef14e1eaa..79708e59259 100644
--- a/src/backend/postmaster/launch_backend.c
+++ b/src/backend/postmaster/launch_backend.c
@@ -229,7 +229,7 @@ PostmasterChildName(BackendType child_type)
*/
pid_t
postmaster_child_launch(BackendType child_type, int child_slot,
- const void *startup_data, size_t startup_data_len,
+ void *startup_data, size_t startup_data_len,
ClientSocket *client_sock)
{
pid_t pid;
diff --git a/src/include/postmaster/postmaster.h b/src/include/postmaster/postmaster.h
index 92497cd6a0f..753871071ac 100644
--- a/src/include/postmaster/postmaster.h
+++ b/src/include/postmaster/postmaster.h
@@ -108,7 +108,7 @@ extern PGDLLIMPORT struct ClientSocket *MyClientSocket;
/* prototypes for functions in launch_backend.c */
extern pid_t postmaster_child_launch(BackendType child_type,
int child_slot,
- const void *startup_data,
+ void *startup_data,
size_t startup_data_len,
struct ClientSocket *client_sock);
const char *PostmasterChildName(BackendType child_type);