From 33df725cc683195ea33eb583a0373a013086a5fb Mon Sep 17 00:00:00 2001 From: Anderson Lizardo Date: Fri, 3 Jan 2014 21:55:18 -0400 Subject: [PATCH] avrcp: Remove unnecessary "if (...)" There is already a "if (type != 0x03 && type != 0x02)" check earlier on the code, so a plain "if (...) else ..." is enough. Fixes clang error: profiles/audio/avrcp.c:2211:12: error: variable 'item' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] --- profiles/audio/avrcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 2eb2ad6d8..8d4309ad3 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -2208,7 +2208,7 @@ static gboolean avrcp_list_items_rsp(struct avctp *conn, uint8_t *operands, if (type == 0x03) item = parse_media_element(session, &operands[i], len); - else if (type == 0x02) + else item = parse_media_folder(session, &operands[i], len); if (item) { -- 2.47.3