[Bluez PATCH v3] gatt-db: remove redundant check in foreach range

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

 



From: Yun-Hao Chung <howardchung@xxxxxxxxxxxx>

svc_start < foreach_data->end has already been checked in a few lines
before.

Reviewed-by: Archie Pusaka <apusaka@xxxxxxxxxxxx>
---

Changes in v3:
- resore check svc_start < foreach_data->start and update commit message

Changes in v2:
- remove the entire check

 src/shared/gatt-db.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
index 8bff4d37aaa2..3a02289ce435 100644
--- a/src/shared/gatt-db.c
+++ b/src/shared/gatt-db.c
@@ -1348,9 +1348,9 @@ static void foreach_in_range(void *data, void *user_data)
 		return;
 
 	if (!foreach_data->attr) {
-		if (svc_start < foreach_data->start ||
-					svc_start > foreach_data->end)
+		if (svc_start < foreach_data->start)
 			return;
+
 		return foreach_service_in_range(data, user_data);
 	}
 
-- 
2.32.0.554.ge1b32706d8-goog




[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