From 2aac3eafdedf433c3ca35f8ba7f58600e1ee6320 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Fri, 20 Feb 2015 15:22:58 +0200 Subject: [PATCH] tools/btgatt-client: Fix incorrect error check --- tools/btgatt-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c index 03fe76b12..95e9b699b 100644 --- a/tools/btgatt-client.c +++ b/tools/btgatt-client.c @@ -1029,7 +1029,7 @@ static void cmd_set_sec_level(struct client *cli, char *cmd_str) return; } - if (bt_gatt_client_set_sec_level(cli->gatt, level) < 0) + if (!bt_gatt_client_set_sec_level(cli->gatt, level)) printf("Could not set sec level\n"); else printf("Setting security level %d success\n", level); -- 2.47.3