dbus/tools dbus-launch.c,1.22,1.23
Havoc Pennington
hp at kemper.freedesktop.org
Mon Mar 12 15:52:42 PDT 2007
Update of /cvs/dbus/dbus/tools
In directory kemper:/tmp/cvs-serv25302/tools
Modified Files:
dbus-launch.c
Log Message:
2007-03-11 Havoc Pennington <hp at 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
Index: dbus-launch.c
===================================================================
RCS file: /cvs/dbus/dbus/tools/dbus-launch.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- dbus-launch.c 3 Mar 2007 10:36:46 -0000 1.22
+++ dbus-launch.c 12 Mar 2007 22:52:40 -0000 1.23
@@ -596,14 +596,17 @@
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));
More information about the dbus-commit
mailing list