From ada2771215d741d05d9b33b1da3eedf4894be1a3 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Tue, 14 Mar 2023 08:41:29 +0100 Subject: [PATCH] MT#56128 SDP manipulations: simplify CMD_ADD lookup Do not use the `g_queue_is_empty()` to check the emptiness of the `add_commands_*` GQueue. It's enough to check the pointer and the first `->head` value. Change-Id: Ie01f45d5f8bbaa5af3a09594cce145a0e83943c2 --- daemon/sdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index 9fdfef674..1a1ecb99a 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -355,7 +355,7 @@ static int sdp_manipulate_check(enum command_type command_type, default: /* MT_UNKNOWN */ q_ptr = &sdp_manipulations->add_commands_glob; } - if (q_ptr && q_ptr->head && !g_queue_is_empty(q_ptr)) + if (q_ptr && q_ptr->head) return 1; break;