mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-29 10:10:19 +01:00
test: Add some OOM paths to the dbus-daemon-eavesdrop path
This will shut Coverity up. All the paths are checks on the return value from dbus_message_set_destination(). Coverity IDs: 54822, 54823, 54824, 54825 Signed-off-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99712 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
f1de9905b1
commit
bbc1ab8d2a
1 changed files with 12 additions and 8 deletions
|
|
@ -88,11 +88,12 @@ sender_send_unicast_to_sender (Fixture *f)
|
|||
|
||||
signal = dbus_message_new_signal (SENDER_PATH, SENDER_IFACE,
|
||||
SENDER_SIGNAL_NAME);
|
||||
dbus_message_set_destination (signal, dbus_bus_get_unique_name (f->sender));
|
||||
|
||||
if (signal == NULL)
|
||||
g_error ("OOM");
|
||||
|
||||
if (!dbus_message_set_destination (signal, dbus_bus_get_unique_name (f->sender)))
|
||||
g_error ("OOM");
|
||||
|
||||
if (!dbus_connection_send (f->sender, signal, NULL))
|
||||
g_error ("OOM");
|
||||
|
||||
|
|
@ -109,11 +110,12 @@ sender_send_unicast_to_receiver (Fixture *f)
|
|||
DBusMessage *signal;
|
||||
|
||||
signal = dbus_message_new_signal (SENDER_PATH, SENDER_IFACE, SENDER_SIGNAL_NAME);
|
||||
dbus_message_set_destination (signal, dbus_bus_get_unique_name (f->receiver));
|
||||
|
||||
if (signal == NULL)
|
||||
g_error ("OOM");
|
||||
|
||||
if (!dbus_message_set_destination (signal, dbus_bus_get_unique_name (f->receiver)))
|
||||
g_error ("OOM");
|
||||
|
||||
if (!dbus_connection_send (f->sender, signal, NULL))
|
||||
g_error ("OOM");
|
||||
|
||||
|
|
@ -128,11 +130,12 @@ sender_send_broadcast (Fixture *f)
|
|||
DBusMessage *signal;
|
||||
|
||||
signal = dbus_message_new_signal (SENDER_PATH, SENDER_IFACE, SENDER_SIGNAL_NAME);
|
||||
dbus_message_set_destination (signal, NULL);
|
||||
|
||||
if (signal == NULL)
|
||||
g_error ("OOM");
|
||||
|
||||
if (!dbus_message_set_destination (signal, NULL))
|
||||
g_error ("OOM");
|
||||
|
||||
if (!dbus_connection_send (f->sender, signal, NULL))
|
||||
g_error ("OOM");
|
||||
|
||||
|
|
@ -152,11 +155,12 @@ sender_send_stopper (Fixture *f)
|
|||
DBusMessage *signal;
|
||||
|
||||
signal = dbus_message_new_signal (SENDER_PATH, SENDER_IFACE, SENDER_STOPPER_NAME);
|
||||
dbus_message_set_destination (signal, NULL);
|
||||
|
||||
if (signal == NULL)
|
||||
g_error ("OOM");
|
||||
|
||||
if (!dbus_message_set_destination (signal, NULL))
|
||||
g_error ("OOM");
|
||||
|
||||
if (!dbus_connection_send (f->sender, signal, NULL))
|
||||
g_error ("OOM");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue