Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@tieto.com>
To: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] bnep: Fix using uninitialized variable
Date: Fri, 29 May 2015 11:11:04 +0200	[thread overview]
Message-ID: <4038111.10QDuYn3KY@leonov> (raw)
In-Reply-To: <1432887270-17632-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

Hi Andrei,

On Friday 29 of May 2015 11:14:30 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> 
> ---
>  profiles/network/bnep.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
> index 59599e4..8748d68 100644
> --- a/profiles/network/bnep.c
> +++ b/profiles/network/bnep.c
> @@ -606,8 +606,8 @@ static int bnep_server_add_legacy(int sk, uint16_t dst,
> char *bridge, char *iface, const bdaddr_t *addr,
>  					uint8_t *setup_data, int len)
>  {
> +	uint16_t rsp = BNEP_SUCCESS;
>  	int err, n;
> -	uint16_t rsp;
> 
>  	n = read(sk, setup_data, len);
>  	if (n != len) {

I'd prefer if this would be set only on success path ie. right before reply 
label.

-- 
BR
Szymon Janc

      reply	other threads:[~2015-05-29  9:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29  8:14 [PATCH] bnep: Fix using uninitialized variable Andrei Emeltchenko
2015-05-29  9:11 ` Szymon Janc [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4038111.10QDuYn3KY@leonov \
    --to=szymon.janc@tieto.com \
    --cc=Andrei.Emeltchenko.news@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox