summaryrefslogtreecommitdiffstats
path: root/tools/dbus-launch.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2007-03-12 22:52:40 +0000
committerHavoc Pennington <hp@redhat.com>2007-03-12 22:52:40 +0000
commit9362aac398e3f2ec680e30c61ebfcb1e407eff72 (patch)
treefaeb94c89d680598d1a809f6a3d952910dd3c741 /tools/dbus-launch.c
parentcc0aea750cb03ffa6a9e94e493455920ab3e612b (diff)
2007-03-11 Havoc Pennington <hp@redhat.com>
* tools/dbus-launch.c (do_close_stderr): fix C89 problem and formatting problem * Mostly fix the DBusPipe mess. - put line break after function return types - put space before parens - do not pass structs around by value - don't use dbus_strerror after calling supposedly cross-platform api - don't name pipe variables "fd" - abstract special fd numbers like -1 and 1
Diffstat (limited to 'tools/dbus-launch.c')
-rw-r--r--tools/dbus-launch.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c
index d3072782..569a3ca6 100644
--- a/tools/dbus-launch.c
+++ b/tools/dbus-launch.c
@@ -596,14 +596,17 @@ babysit (int exit_with_session,
exit (0);
}
-static void do_close_stderr (void)
+static void
+do_close_stderr (void)
{
+ int fd;
+
fflush (stderr);
/* dbus-launch is a Unix-only program, so we can rely on /dev/null being there.
* We're including unistd.h and we're dealing with sh/csh launch sequences...
*/
- int fd = open ("/dev/null", O_RDWR);
+ fd = open ("/dev/null", O_RDWR);
if (fd == -1)
{
fprintf (stderr, "Internal error: cannot open /dev/null: %s", strerror (errno));