summaryrefslogtreecommitdiff
path: root/src/profile.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-03-27 11:04:57 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2014-03-27 11:04:57 +0200
commite35a11d7d3c6924c22bdd0621d34cbb23b5ba9a3 (patch)
tree4130408b86c948ed595408a6dfc8dffeca334ea8 /src/profile.c
parent4b8dc77bb5e4415e36447217ba2ce741b8eab9ed (diff)
downloadbluez-e35a11d7d3c6924c22bdd0621d34cbb23b5ba9a3.tar.gz
core: Minor coding style fix
Diffstat (limited to 'src/profile.c')
-rw-r--r--src/profile.c6
1 files 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);