From e35a11d7d3c6924c22bdd0621d34cbb23b5ba9a3 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 27 Mar 2014 11:04:57 +0200 Subject: [PATCH] core: Minor coding style fix --- src/profile.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/profile.c b/src/profile.c index 7c2fe18fc..f06523536 100644 --- a/src/profile.c +++ b/src/profile.c @@ -1047,7 +1047,7 @@ static struct ext_io *create_conn(struct ext_io *server, GIOChannel *io, bdaddr_t *src, bdaddr_t *dst) { struct btd_device *device; - struct btd_service *service = NULL; + struct btd_service *service; struct ext_io *conn; GIOCondition cond; char addr[18]; @@ -1060,8 +1060,10 @@ static struct ext_io *create_conn(struct ext_io *server, GIOChannel *io, } /* Do not add UUID if client role is not enabled */ - if (!server->ext->enable_client) + if (!server->ext->enable_client) { + service = NULL; goto done; + } btd_device_add_uuid(device, server->ext->remote_uuid); service = btd_device_get_service(device, server->ext->remote_uuid); -- 2.47.3