From 7248954e436d535f4f1f41062453a47a28ba5503 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 9 Feb 2017 09:40:51 +0000 Subject: [PATCH] test: Simplify error checking path in test-service slightly This should shut up Coverity from complaining about not checking the return value of dbus_set_error_from_message(), which is equivalent to the (type == DBUS_MESSAGE_TYPE_ERROR) check. Coverity ID: 54697 Signed-off-by: Philip Withnall https://bugs.freedesktop.org/show_bug.cgi?id=99723 --- test/test-service.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/test-service.c b/test/test-service.c index bcfb734..b500af3 100644 --- a/test/test-service.c +++ b/test/test-service.c @@ -92,9 +92,8 @@ check_hello_from_self_reply (DBusPendingCall *pcall, dbus_message_unref (echo_reply); } - else if (type == DBUS_MESSAGE_TYPE_ERROR) + else if (dbus_set_error_from_message (&error, reply)) { - dbus_set_error_from_message (&error, reply); printf ("Error type in reply: %s\n", error.message); if (strcmp (error.name, DBUS_ERROR_NO_MEMORY) != 0) -- 2.9.3