]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
internals: remove newline, pid from assertion failures
authorSimon McVittie <smcv@debian.org>
Thu, 21 Jul 2016 09:55:59 +0000 (10:55 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 30 Sep 2016 18:36:50 +0000 (19:36 +0100)
_dbus_warn() now calls _dbus_logv() which always logs the pid and
prints a newline anyway.

Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97009

dbus/dbus-internals.c

index ae6b9a1354a300fad6f869fb761620b6243b3363..17bb39c4ee7787689a2bf41e9692eb4de4b5ee0e 100644 (file)
@@ -972,8 +972,8 @@ _dbus_real_assert (dbus_bool_t  condition,
 {
   if (_DBUS_UNLIKELY (!condition))
     {
-      _dbus_warn ("%lu: assertion failed \"%s\" file \"%s\" line %d function %s\n",
-                  _dbus_pid_for_log (), condition_text, file, line, func);
+      _dbus_warn ("assertion failed \"%s\" file \"%s\" line %d function %s",
+                  condition_text, file, line, func);
       _dbus_abort ();
     }
 }
@@ -993,8 +993,8 @@ _dbus_real_assert_not_reached (const char *explanation,
                                const char *file,
                                int         line)
 {
-  _dbus_warn ("File \"%s\" line %d process %lu should not have been reached: %s\n",
-              file, line, _dbus_pid_for_log (), explanation);
+  _dbus_warn ("File \"%s\" line %d should not have been reached: %s",
+              file, line, explanation);
   _dbus_abort ();
 }
 #endif /* DBUS_DISABLE_ASSERT */