* dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect format string.
authorOlivier Andrieu <oliv__a@users.sourceforge.net>
Thu, 7 Oct 2004 09:56:02 +0000 (09:56 +0000)
committerOlivier Andrieu <oliv__a@users.sourceforge.net>
Thu, 7 Oct 2004 09:56:02 +0000 (09:56 +0000)
* glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL pointer
(bug #1540, Leonardo Boiko).

ChangeLog
dbus/dbus-sysdeps.c
glib/dbus-gmain.c

index 75b4dfc..9f05ea4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-10-07  Olivier Andrieu  <oliv__a@users.sourceforge.net>
+
+       * 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  <trow@ximian.com>
 
        * mono/BusDriver.cs: Changed BusDriver struct to remove
index 2b3ec51..80188e4 100644 (file)
@@ -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;
     }
index 23c5a78..30b1c4e 100644 (file)
@@ -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);
 }