* [PATCH] tools/gatt: Fix incorrect error check
@ 2015-02-20 13:22 Andrei Emeltchenko
2015-02-24 16:49 ` Szymon Janc
0 siblings, 1 reply; 2+ messages in thread
From: Andrei Emeltchenko @ 2015-02-20 13:22 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
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 e59d5db..25ace4a 100644
--- a/tools/btgatt-client.c
+++ b/tools/btgatt-client.c
@@ -1021,7 +1021,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.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tools/gatt: Fix incorrect error check
2015-02-20 13:22 [PATCH] tools/gatt: Fix incorrect error check Andrei Emeltchenko
@ 2015-02-24 16:49 ` Szymon Janc
0 siblings, 0 replies; 2+ messages in thread
From: Szymon Janc @ 2015-02-24 16:49 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
On Friday 20 of February 2015 15:22:58 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> ---
> 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 e59d5db..25ace4a 100644
> --- a/tools/btgatt-client.c
> +++ b/tools/btgatt-client.c
> @@ -1021,7 +1021,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);
>
Patch applied, thanks.
--
Best regards,
Szymon Janc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-24 16:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-20 13:22 [PATCH] tools/gatt: Fix incorrect error check Andrei Emeltchenko
2015-02-24 16:49 ` Szymon Janc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox