]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb: Change the ctdb_vfork_exec prototype to const char*const*
authorVolker Lendecke <vl@samba.org>
Fri, 20 Sep 2024 00:54:57 +0000 (02:54 +0200)
committerMartin Schwenke <martins@samba.org>
Sun, 22 Sep 2024 09:36:36 +0000 (09:36 +0000)
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 <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/include/ctdb_private.h
ctdb/server/ctdb_fork.c

index 88f775ce1264320b81e6dfb88f150d88454ea691..b36eaa08a086c2b9e5875ea46273c9f836695059 100644 (file)
@@ -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);
 
index 1065423199dcae48759cabfbb8ac9756c1be2e4c..8f3e0896b32536081318317fb3f7a020e242202c 100644 (file)
@@ -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;