Commit 8203fe35 authored by Chengwei Yang's avatar Chengwei Yang Committed by Simon McVittie
Browse files
parent fa783ea4
......@@ -885,13 +885,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
/* The message signature has already been checked for us,
* so let's just assert it's right.
*/
#ifndef DBUS_DISABLE_ASSERT
{
int msg_type = dbus_message_iter_get_arg_type (&iter);
_dbus_assert (msg_type == DBUS_TYPE_ARRAY);
}
#endif
_dbus_assert (dbus_message_iter_get_arg_type (&iter) == DBUS_TYPE_ARRAY);
dbus_message_iter_recurse (&iter, &dict_iter);
......@@ -2008,13 +2002,8 @@ bus_driver_handle_message (DBusConnection *connection,
_dbus_verbose ("Driver got a method call: %s\n", name);
/* security checks should have kept this from getting here */
#ifndef DBUS_DISABLE_ASSERT
{
const char *sender = dbus_message_get_sender (message);
_dbus_assert (sender != NULL || strcmp (name, "Hello") == 0);
}
#endif
_dbus_assert (dbus_message_get_sender (message) != NULL ||
strcmp (name, "Hello") == 0);
for (ih = interface_handlers; ih->name != NULL; ih++)
{
......
......@@ -335,14 +335,11 @@ reallocate_for_length (DBusRealString *real,
* disable asserts to profile, you don't get this destroyer
* of profiles.
*/
#ifdef DBUS_DISABLE_ASSERT
#else
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
#if defined (DBUS_ENABLE_EMBEDDED_TESTS) && !defined (DBUS_DISABLE_ASSERT)
new_allocated = 0; /* ensure a realloc every time so that we go
* through all malloc failure codepaths
*/
#endif /* DBUS_ENABLE_EMBEDDED_TESTS */
#endif /* !DBUS_DISABLE_ASSERT */
#endif
/* But be sure we always alloc at least space for the new length */
new_allocated = MAX (new_allocated,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment