From: Thomas Hindoe Paaboel Andersen Date: Wed, 4 Dec 2013 19:01:07 +0000 (+0100) Subject: systemctl: no need to fdopen stdout X-Git-Tag: v209~1120 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=4fd944ec822414b743bc39de37a4751c729463d3 systemctl: no need to fdopen stdout --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index f3db6bfdb..d5d6b9f7d 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -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);