chiark / gitweb /
systemctl: no need to fdopen stdout
[elogind.git] / src / systemctl / systemctl.c
index f3db6bfdbf1722f556ad93ab8ecce045cabd892a..d5d6b9f7d5990257cb65666f3e9be5a4d260ad87 100644 (file)
@@ -3690,7 +3690,6 @@ static int cat(sd_bus *bus, char **args) {
                 _cleanup_free_ char *fragment_path = NULL;
                 _cleanup_strv_free_ char **dropin_paths = NULL;
                 sd_bus_error error;
-                FILE *stdout;
                 char **path;
 
                 n = unit_name_mangle(*name);
@@ -3731,8 +3730,6 @@ static int cat(sd_bus *bus, char **args) {
                         continue;
                 }
 
-                stdout = fdopen(STDOUT_FILENO, "a");
-
                 if (!isempty(fragment_path)) {
                         fprintf(stdout, "# %s\n", fragment_path);
                         fflush(stdout);