]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
socket-activate: drop arg_args
authorMike Yuan <me@yhndnzj.com>
Sun, 27 Apr 2025 17:52:19 +0000 (19:52 +0200)
committerMike Yuan <me@yhndnzj.com>
Sun, 27 Apr 2025 18:21:10 +0000 (20:21 +0200)
To follow our usual coding style.

src/socket-activate/socket-activate.c

index ac663d03238620033eef215c2b6ff9d231b14dc8..477f9d66567a009e1e4532a07bbb215d88fbf424 100644 (file)
@@ -29,7 +29,6 @@
 static char **arg_listen = NULL;
 static bool arg_accept = false;
 static int arg_socket_type = SOCK_STREAM;
-static char **arg_args = NULL;
 static char **arg_setenv = NULL;
 static char **arg_fdnames = NULL;
 static bool arg_inetd = false;
@@ -436,8 +435,6 @@ static int parse_argv(int argc, char *argv[]) {
                                        "Datagram sockets do not accept connections. "
                                        "The --datagram and --accept options may not be combined.");
 
-        arg_args = argv + optind;
-
         return 1 /* work to do */;
 }
 
@@ -452,7 +449,7 @@ static int run(int argc, char **argv) {
         if (r <= 0)
                 return r;
 
-        exec_argv = strv_copy(arg_args);
+        exec_argv = strv_copy(argv + optind);
         if (!exec_argv)
                 return log_oom();