[PATCH BlueZ 2/9] advertising: parse_secondary: fix mask value

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

 



It looks like a wrong mask value is used here as only the bits mentioned
in adv_secondary::flag can be set again within the loop.

Replace magic number by preprocessor macro.
---
 src/advertising.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/advertising.c b/src/advertising.c
index 15ef44def031..42ac627604fe 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -1051,7 +1051,7 @@ static bool parse_secondary(DBusMessageIter *iter,
 		return false;
 
 	/* Reset secondary channels before parsing */
-	client->flags &= 0xfe00;
+	client->flags &= ~MGMT_ADV_FLAG_SEC_MASK;
 
 	dbus_message_iter_get_basic(iter, &str);
 
-- 
2.35.3




[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