All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] android/health: Fix incorrect check
@ 2014-08-29 11:24 Andrei Emeltchenko
  2014-08-29 14:18 ` Szymon Janc
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Emeltchenko @ 2014-08-29 11:24 UTC (permalink / raw)
  To: linux-bluetooth

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

"!create_mdl(channel) < 0" is always false since it returns bool
---
 android/health.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/health.c b/android/health.c
index abf01b4..fb2a1e3 100644
--- a/android/health.c
+++ b/android/health.c
@@ -1949,7 +1949,7 @@ static void bt_health_connect_channel(const void *buf, uint16_t len)
 			goto fail;
 
 		/* create mdl if it does not exists */
-		if (!channel->mdl && !create_mdl(channel) < 0)
+		if (!channel->mdl && !create_mdl(channel))
 			goto fail;
 
 		/* reconnect mdl if it exists */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] android/health: Fix incorrect check
  2014-08-29 11:24 [PATCH] android/health: Fix incorrect check Andrei Emeltchenko
@ 2014-08-29 14:18 ` Szymon Janc
  0 siblings, 0 replies; 2+ messages in thread
From: Szymon Janc @ 2014-08-29 14:18 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

On Friday 29 of August 2014 14:24:21 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> "!create_mdl(channel) < 0" is always false since it returns bool
> ---
>  android/health.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/android/health.c b/android/health.c
> index abf01b4..fb2a1e3 100644
> --- a/android/health.c
> +++ b/android/health.c
> @@ -1949,7 +1949,7 @@ static void bt_health_connect_channel(const void *buf, uint16_t len)
>  			goto fail;
>  
>  		/* create mdl if it does not exists */
> -		if (!channel->mdl && !create_mdl(channel) < 0)
> +		if (!channel->mdl && !create_mdl(channel))
>  			goto fail;
>  
>  		/* reconnect mdl if it exists */

Applied. Thanks. 

-- 
Best regards, 
Szymon Janc

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-29 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-29 11:24 [PATCH] android/health: Fix incorrect check Andrei Emeltchenko
2014-08-29 14:18 ` Szymon Janc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.