linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] android/tester: Fix using uninitialized variable
@ 2014-08-11  7:17 Andrei Emeltchenko
  2014-08-11  7:34 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Emeltchenko @ 2014-08-11  7:17 UTC (permalink / raw)
  To: linux-bluetooth

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

Fix typo not initializing variable. Silence warnings:

...
/android/tester-hdp.c: 71 in create_app()
/android/tester-hdp.c: 97 in create_app()
...
>>>     Using uninitialized value "mdep2". Field
>>>     "mdep2.mdep_description" is uninitialized.
71              reg->mdep_cfg[1] = mdep2;
...
>>>     Using uninitialized value "mdep2". Field
>>>     "mdep2.mdep_description" is uninitialized.
97              reg->mdep_cfg[1] = mdep2;
...
---
 android/tester-hdp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/android/tester-hdp.c b/android/tester-hdp.c
index 9193609..bfe8a99 100644
--- a/android/tester-hdp.c
+++ b/android/tester-hdp.c
@@ -43,8 +43,9 @@ static bthl_reg_param_t *create_app(hdp_app_reg_type type)
 
 	mdep1.data_type = 4100;
 	mdep1.mdep_description = "pulse-oximeter";
+
 	mdep2.data_type = 4100;
-	mdep1.mdep_description = "pulse-oximeter";
+	mdep2.mdep_description = "pulse-oximeter";
 
 	switch (type) {
 	case HDP_APP_SINK_RELIABLE:
-- 
1.9.1


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

* Re: [PATCH] android/tester: Fix using uninitialized variable
  2014-08-11  7:17 [PATCH] android/tester: Fix using uninitialized variable Andrei Emeltchenko
@ 2014-08-11  7:34 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2014-08-11  7:34 UTC (permalink / raw)
  To: Andrei Emeltchenko; +Cc: linux-bluetooth

Hi Andrei,

On Mon, Aug 11, 2014, Andrei Emeltchenko wrote:
> Fix typo not initializing variable. Silence warnings:
> 
> ...
> /android/tester-hdp.c: 71 in create_app()
> /android/tester-hdp.c: 97 in create_app()
> ...
> >>>     Using uninitialized value "mdep2". Field
> >>>     "mdep2.mdep_description" is uninitialized.
> 71              reg->mdep_cfg[1] = mdep2;
> ...
> >>>     Using uninitialized value "mdep2". Field
> >>>     "mdep2.mdep_description" is uninitialized.
> 97              reg->mdep_cfg[1] = mdep2;
> ...
> ---
>  android/tester-hdp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied. Thanks.

Johan

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

end of thread, other threads:[~2014-08-11  7:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-11  7:17 [PATCH] android/tester: Fix using uninitialized variable Andrei Emeltchenko
2014-08-11  7:34 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).