[PATCH BlueZ 02/12] avrcp: Remove unnecessary "if (...)"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 2eb2ad6..8d4309a 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) {
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux