From f9be8643dc29d162e4f109a3c2d7a1203ebb5f9c Mon Sep 17 00:00:00 2001 From: Marcin Kraglak Date: Thu, 10 Apr 2014 20:40:38 +0200 Subject: [PATCH] android/gatt: Remove double variable check --- android/gatt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/android/gatt.c b/android/gatt.c index ff032e60e..12c35ca93 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(); -- 2.47.3