]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: change confusing parameter name
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 1 Mar 2021 09:37:33 +0000 (10:37 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 1 Mar 2021 10:26:52 +0000 (11:26 +0100)
fixup_output() is used for both stdout and stderr.

src/core/execute.c

index de51eba11c0798edad880309e2dd354c54f8f89f..0d3fc1c0fc4a425bdb249b3ebc4b9a53d2809702 100644 (file)
@@ -446,12 +446,12 @@ static int fixup_input(
         return std_input;
 }
 
-static int fixup_output(ExecOutput std_output, int socket_fd) {
+static int fixup_output(ExecOutput output, int socket_fd) {
 
-        if (std_output == EXEC_OUTPUT_SOCKET && socket_fd < 0)
+        if (output == EXEC_OUTPUT_SOCKET && socket_fd < 0)
                 return EXEC_OUTPUT_INHERIT;
 
-        return std_output;
+        return output;
 }
 
 static int setup_input(
@@ -622,7 +622,7 @@ static int setup_output(
                     o == EXEC_OUTPUT_INHERIT &&
                     i == EXEC_INPUT_NULL &&
                     !is_terminal_input(context->std_input) &&
-                    getppid () != 1)
+                    getppid() != 1)
                         return fileno;
 
                 /* Duplicate from stdout if possible */
@@ -666,7 +666,8 @@ static int setup_output(
         case EXEC_OUTPUT_JOURNAL_AND_CONSOLE:
                 r = connect_logger_as(unit, context, params, o, ident, fileno, uid, gid);
                 if (r < 0) {
-                        log_unit_warning_errno(unit, r, "Failed to connect %s to the journal socket, ignoring: %m", fileno == STDOUT_FILENO ? "stdout" : "stderr");
+                        log_unit_warning_errno(unit, r, "Failed to connect %s to the journal socket, ignoring: %m",
+                                               fileno == STDOUT_FILENO ? "stdout" : "stderr");
                         r = open_null_as(O_WRONLY, fileno);
                 } else {
                         struct stat st;