Re: [PATCH] bnep: Fix using uninitialized variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrei,

On Friday 29 of May 2015 11:14:30 Andrei Emeltchenko wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>
> 
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux