Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] shared/hfp: Remove reduntant check
@ 2014-10-29 23:16 Lukasz Rymanowski
  2014-10-29 23:16 ` [PATCH 2/2] shared/hfp: Fix for invalid string copy Lukasz Rymanowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lukasz Rymanowski @ 2014-10-29 23:16 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lukasz Rymanowski

This check is not needed. Below memcmp check is sufficient
---
 src/shared/hfp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index 22e9622..f5a812d 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -135,9 +135,6 @@ static bool match_handler_prefix(const void *a, const void *b)
 	const struct cmd_handler *handler = a;
 	const char *prefix = b;
 
-	if (strlen(handler->prefix) != strlen(prefix))
-		return false;
-
 	if (memcmp(handler->prefix, prefix, strlen(prefix)))
 		return false;
 
-- 
1.8.4


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

end of thread, other threads:[~2014-10-31 19:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-29 23:16 [PATCH 1/2] shared/hfp: Remove reduntant check Lukasz Rymanowski
2014-10-29 23:16 ` [PATCH 2/2] shared/hfp: Fix for invalid string copy Lukasz Rymanowski
2014-10-31 19:23   ` Szymon Janc
2014-10-30  9:56 ` [PATCH 1/2] shared/hfp: Remove reduntant check Szymon Janc
2014-10-30 10:11 ` Marcin Kraglak
2014-10-30 15:09   ` Lukasz Rymanowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox