🌐 AI搜索 & 代理 主页
Skip to content

Commit e179115

Browse files
committed
Fix incorrect const qualifier
Commit 7202d72 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.
1 parent 2ddbfed commit e179115

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/postmaster/launch_backend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ PostmasterChildName(BackendType child_type)
227227
*/
228228
pid_t
229229
postmaster_child_launch(BackendType child_type, int child_slot,
230-
const void *startup_data, size_t startup_data_len,
230+
void *startup_data, size_t startup_data_len,
231231
ClientSocket *client_sock)
232232
{
233233
pid_t pid;

src/include/postmaster/postmaster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ extern PGDLLIMPORT struct ClientSocket *MyClientSocket;
108108
/* prototypes for functions in launch_backend.c */
109109
extern pid_t postmaster_child_launch(BackendType child_type,
110110
int child_slot,
111-
const void *startup_data,
111+
void *startup_data,
112112
size_t startup_data_len,
113113
struct ClientSocket *client_sock);
114114
const char *PostmasterChildName(BackendType child_type);

0 commit comments

Comments
 (0)