From dbb4ee01e029908787dbf38fa2543ac35e36b5dd Mon Sep 17 00:00:00 2001 From: Olivier Andrieu Date: Thu, 7 Oct 2004 09:56:02 +0000 Subject: [PATCH] * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect format string. * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL pointer (bug #1540, Leonardo Boiko). --- ChangeLog | 8 ++++++++ dbus/dbus-sysdeps.c | 2 +- glib/dbus-gmain.c | 9 ++++----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75b4dfc..9f05ea4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-10-07 Olivier Andrieu + + * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect + format string. + + * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL + pointer (bug #1540, Leonardo Boiko). + 2004-09-28 Jon Trowbridge * mono/BusDriver.cs: Changed BusDriver struct to remove diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c index 2b3ec51..80188e4 100644 --- a/dbus/dbus-sysdeps.c +++ b/dbus/dbus-sysdeps.c @@ -2122,7 +2122,7 @@ _dbus_file_get_contents (DBusString *str, { dbus_set_error (error, DBUS_ERROR_FAILED, "File size %lu of \"%s\" is too large.", - filename_c, (unsigned long) sb.st_size); + (unsigned long) sb.st_size, filename_c); close (fd); return FALSE; } diff --git a/glib/dbus-gmain.c b/glib/dbus-gmain.c index 23c5a78..30b1c4e 100644 --- a/glib/dbus-gmain.c +++ b/glib/dbus-gmain.c @@ -610,12 +610,11 @@ dbus_g_bus_get (DBusBusType type, { dbus_set_g_error (error, &derror); dbus_error_free (&derror); + return NULL; } - else - { - /* does nothing if it's already been done */ - dbus_connection_setup_with_g_main (connection, NULL); - } + + /* does nothing if it's already been done */ + dbus_connection_setup_with_g_main (connection, NULL); return DBUS_G_CONNECTION_FROM_CONNECTION (connection); } -- 2.7.4