linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] android/gatt: Fix dead code warnings
@ 2014-12-19  9:24 Andrei Emeltchenko
  2014-12-19 10:07 ` Szymon Janc
  2015-01-08 14:19 ` Andrei Emeltchenko
  0 siblings, 2 replies; 16+ messages in thread
From: Andrei Emeltchenko @ 2014-12-19  9:24 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

gatt_db_attribute_get_permissions() used everywhere without check since
those conditions are checked already.
---
 android/gatt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/android/gatt.c b/android/gatt.c
index 0258d91..169f6db 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -6311,8 +6311,7 @@ static void write_cmd_request(const uint8_t *cmd, uint16_t cmd_len,
 	if (!attrib)
 		return;
 
-	if (!gatt_db_attribute_get_permissions(attrib, &permissions))
-		return;
+	gatt_db_attribute_get_permissions(attrib, &permissions);
 
 	if (check_device_permissions(dev, cmd[0], permissions))
 		return;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [PATCH] android/gatt: Fix dead code warnings
@ 2014-11-10 13:25 Andrei Emeltchenko
  2014-11-10 20:05 ` Szymon Janc
  0 siblings, 1 reply; 16+ messages in thread
From: Andrei Emeltchenko @ 2014-11-10 13:25 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

gatt_db_attribute_get_permissions() used everywhere without check since
those conditions are checked already.
---
 android/gatt.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/android/gatt.c b/android/gatt.c
index 086bb94..04101f6 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -5992,8 +5992,7 @@ static void write_cmd_request(const uint8_t *cmd, uint16_t cmd_len,
 	if (!attrib)
 		return;
 
-	if (!gatt_db_attribute_get_permissions(attrib, &permissions))
-		return;
+	gatt_db_attribute_get_permissions(attrib, &permissions);
 
 	if (check_device_permissions(dev, cmd[0], permissions))
 		return;
-- 
1.9.1


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

end of thread, other threads:[~2015-01-20 10:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-19  9:24 [PATCH] android/gatt: Fix dead code warnings Andrei Emeltchenko
2014-12-19 10:07 ` Szymon Janc
2014-12-19 10:14   ` Andrei Emeltchenko
2014-12-19 10:15     ` Szymon Janc
2014-12-19 10:18       ` [PATCH] android/gatt: Simplify gatt_db_attribute_get_permissions() Andrei Emeltchenko
2015-01-09 10:10         ` Szymon Janc
2015-01-13 10:09           ` [PATCHv2 1/2] android/gatt: Fix dead code warnings Andrei Emeltchenko
2015-01-13 10:09             ` [PATCHv2 2/2] android/gatt: Refactor gatt_db_attribute_get_permissions() Andrei Emeltchenko
2015-01-20 10:48             ` [PATCHv2 1/2] android/gatt: Fix dead code warnings Szymon Janc
2014-12-19 10:22       ` [PATCH] " Andrei Emeltchenko
2015-01-08 14:19 ` Andrei Emeltchenko
  -- strict thread matches above, loose matches on Subject: below --
2014-11-10 13:25 Andrei Emeltchenko
2014-11-10 20:05 ` Szymon Janc
2014-11-11  8:22   ` Andrei Emeltchenko
2014-11-13 13:24     ` Szymon Janc
2014-11-13 13:33       ` Andrei Emeltchenko

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).