From 83716809a8ff0057aa5ef58b6f951b8d5197c67f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 20 Sep 2024 02:54:57 +0200 Subject: [PATCH] ctdb: Change the ctdb_vfork_exec prototype to const char*const* I could not find out how to cast a char ** to const char ** without warning. This transfers fine to the execv call as well. Signed-off-by: Volker Lendecke Reviewed-by: Martin Schwenke --- ctdb/include/ctdb_private.h | 8 +++++--- ctdb/server/ctdb_fork.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 88f775ce126..b36eaa08a08 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -609,9 +609,11 @@ int switch_from_server_to_client(struct ctdb_context *ctdb); void ctdb_track_child(struct ctdb_context *ctdb, pid_t pid); pid_t ctdb_fork(struct ctdb_context *ctdb); -pid_t ctdb_vfork_exec(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, - const char *helper, int helper_argc, - const char **helper_argv); +pid_t ctdb_vfork_exec(TALLOC_CTX *mem_ctx, + struct ctdb_context *ctdb, + const char *helper, + int helper_argc, + const char *const *helper_argv); struct tevent_signal *ctdb_init_sigchld(struct ctdb_context *ctdb); diff --git a/ctdb/server/ctdb_fork.c b/ctdb/server/ctdb_fork.c index 1065423199d..8f3e0896b32 100644 --- a/ctdb/server/ctdb_fork.c +++ b/ctdb/server/ctdb_fork.c @@ -105,9 +105,11 @@ pid_t ctdb_fork(struct ctdb_context *ctdb) /* * vfork + exec */ -pid_t ctdb_vfork_exec(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, - const char *helper, int helper_argc, - const char **helper_argv) +pid_t ctdb_vfork_exec(TALLOC_CTX *mem_ctx, + struct ctdb_context *ctdb, + const char *helper, + int helper_argc, + const char *const *helper_argv) { pid_t pid; struct timeval before; -- 2.47.3