linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez PATCH v3] gatt-db: remove redundant check in foreach range
@ 2021-07-29  3:36 Howard Chung
  2021-07-29  3:59 ` [Bluez,v3] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Howard Chung @ 2021-07-29  3:36 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Yun-Hao Chung, Archie Pusaka

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

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

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

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


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

end of thread, other threads:[~2021-07-29  3:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29  3:36 [Bluez PATCH v3] gatt-db: remove redundant check in foreach range Howard Chung
2021-07-29  3:59 ` [Bluez,v3] " bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).