[PATCH 4/4] android/gatt: Remove double variable check

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

 



---
 android/gatt.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/android/gatt.c b/android/gatt.c
index b246137..d9dff4f 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -580,13 +580,12 @@ static struct service *create_service(uint8_t id, bool primary, char *uuid,
 
 	/* Put primary service to our local list */
 	s->primary = primary;
-	if (s->primary)
+	if (s->primary) {
 		memcpy(&s->prim, data, sizeof(s->prim));
-	else
+	} else {
 		memcpy(&s->incl, data, sizeof(s->incl));
-
-	if (!s->primary)
 		return s;
+	}
 
 	/* For primary service allocate queue for included services */
 	s->included = queue_new();
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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