chiark / gitweb /
systemctl: no need to fdopen stdout
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 4 Dec 2013 19:01:07 +0000 (20:01 +0100)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 4 Dec 2013 21:29:51 +0000 (22:29 +0100)
src/systemctl/systemctl.c

index f3db6bf..d5d6b9f 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);