All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez PATCH v2] gatt-db: fix service in range check
@ 2021-07-28 13:23 Howard Chung
  2021-07-28 13:43 ` [Bluez,v2] " bluez.test.bot
  0 siblings, 1 reply; 3+ messages in thread
From: Howard Chung @ 2021-07-28 13:23 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Yun-Hao Chung, Archie Pusaka

From: Yun-Hao Chung <howardchung@chromium.org>

The previous check already makes sure the service range overlaps with
the search range. There is no need to add another check.

Reviewed-by: Archie Pusaka <apusaka@chromium.org>
---

Changes in v2:
- remove the entire check

 src/shared/gatt-db.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
index 8bff4d37aaa2..658f82812cf6 100644
--- a/src/shared/gatt-db.c
+++ b/src/shared/gatt-db.c
@@ -1347,12 +1347,8 @@ static void foreach_in_range(void *data, void *user_data)
 	if (svc_start > foreach_data->end || svc_end < foreach_data->start)
 		return;
 
-	if (!foreach_data->attr) {
-		if (svc_start < foreach_data->start ||
-					svc_start > foreach_data->end)
-			return;
+	if (!foreach_data->attr)
 		return foreach_service_in_range(data, user_data);
-	}
 
 	for (i = 0; i < service->num_handles; i++) {
 		struct gatt_db_attribute *attribute = service->attributes[i];
-- 
2.32.0.432.gabb21c7263-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-28 17:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 13:23 [Bluez PATCH v2] gatt-db: fix service in range check Howard Chung
2021-07-28 13:43 ` [Bluez,v2] " bluez.test.bot
2021-07-28 17:38   ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.