All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] android/haltest: Fix double file close
@ 2014-01-09  9:26 Andrei Emeltchenko
  2014-01-09 10:45 ` [PATCH] android/haltest: Silence static analyzers Andrei Emeltchenko
  2014-01-13 17:54 ` [PATCH] android/haltest: Fix double file close Anderson Lizardo
  0 siblings, 2 replies; 4+ messages in thread
From: Andrei Emeltchenko @ 2014-01-09  9:26 UTC (permalink / raw)
  To: linux-bluetooth

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

---
 android/android-tester.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/android/android-tester.c b/android/android-tester.c
index a448ab5..f5f8c62 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -443,8 +443,6 @@ static void emulator(int pipe, int hci_index)
 	if (len <= 0 || (strcmp(buf, "ctl.start=bluetoothd")))
 		goto failed;
 
-	close(pipe);
-	close(fd);
 	bluetoothd_start(hci_index);
 
 failed:
-- 
1.8.3.2


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

* [PATCH] android/haltest: Silence static analyzers
  2014-01-09  9:26 [PATCH] android/haltest: Fix double file close Andrei Emeltchenko
@ 2014-01-09 10:45 ` Andrei Emeltchenko
  2014-01-09 17:06   ` Szymon Janc
  2014-01-13 17:54 ` [PATCH] android/haltest: Fix double file close Anderson Lizardo
  1 sibling, 1 reply; 4+ messages in thread
From: Andrei Emeltchenko @ 2014-01-09 10:45 UTC (permalink / raw)
  To: linux-bluetooth

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

This makes code more readable and silence static analyzers which think
that pipe and fd are close two times.
---
 android/android-tester.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/android-tester.c b/android/android-tester.c
index a448ab5..c14cc19 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -445,7 +445,7 @@ static void emulator(int pipe, int hci_index)
 
 	close(pipe);
 	close(fd);
-	bluetoothd_start(hci_index);
+	return bluetoothd_start(hci_index);
 
 failed:
 	close(pipe);
-- 
1.8.3.2


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

* Re: [PATCH] android/haltest: Silence static analyzers
  2014-01-09 10:45 ` [PATCH] android/haltest: Silence static analyzers Andrei Emeltchenko
@ 2014-01-09 17:06   ` Szymon Janc
  0 siblings, 0 replies; 4+ messages in thread
From: Szymon Janc @ 2014-01-09 17:06 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

On Thursday 09 January 2014 12:45:20 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> This makes code more readable and silence static analyzers which think
> that pipe and fd are close two times.
> ---
>  android/android-tester.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/android/android-tester.c b/android/android-tester.c
> index a448ab5..c14cc19 100644
> --- a/android/android-tester.c
> +++ b/android/android-tester.c
> @@ -445,7 +445,7 @@ static void emulator(int pipe, int hci_index)
> 
>  	close(pipe);
>  	close(fd);
> -	bluetoothd_start(hci_index);
> +	return bluetoothd_start(hci_index);
> 
>  failed:
>  	close(pipe);

Applied, thanks.

-- 
Szymon K. Janc
szymon.janc@gmail.com

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

* Re: [PATCH] android/haltest: Fix double file close
  2014-01-09  9:26 [PATCH] android/haltest: Fix double file close Andrei Emeltchenko
  2014-01-09 10:45 ` [PATCH] android/haltest: Silence static analyzers Andrei Emeltchenko
@ 2014-01-13 17:54 ` Anderson Lizardo
  1 sibling, 0 replies; 4+ messages in thread
From: Anderson Lizardo @ 2014-01-13 17:54 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: BlueZ development

Hi Andrei,

I see that you are fixing some issues pointed by Coverity Scan. Last
month, I registered a project there for BlueZ. If you are interested
in coordinating fixes (so we don't end up working on fixing the same
issues), let know the email you registered there so I can add you as
member of the project.

The same invitation applies to any regular BlueZ developer that wants
to work on analyzing and fixing bugs reported by Coverity. You can
also request to apply on the project page:

https://scan.coverity.com/projects/1109

Best Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

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

end of thread, other threads:[~2014-01-13 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-09  9:26 [PATCH] android/haltest: Fix double file close Andrei Emeltchenko
2014-01-09 10:45 ` [PATCH] android/haltest: Silence static analyzers Andrei Emeltchenko
2014-01-09 17:06   ` Szymon Janc
2014-01-13 17:54 ` [PATCH] android/haltest: Fix double file close Anderson Lizardo

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.