From: Volker Lendecke Date: Fri, 20 Sep 2024 00:54:57 +0000 (+0200) Subject: ctdb: Change the ctdb_vfork_exec prototype to const char*const* X-Git-Tag: tdb-1.4.13~1181 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=83716809a8ff0057aa5ef58b6f951b8d5197c67f;p=thirdparty%2Fsamba.git 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 --- 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;