Re: [PATCH wpan-tools] hwsim: make sure lqi is always initialized

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

 



Hello.

On 29.11.18 20:58, Stefan Schmidt wrote:
> The lqi variable was not initialized in all code paths.
> 
> CID: 185497
> 
> Signed-off-by: Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx>
> ---
>  wpan-hwsim/wpan-hwsim.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/wpan-hwsim/wpan-hwsim.c b/wpan-hwsim/wpan-hwsim.c
> index 3e54348..0a7c492 100644
> --- a/wpan-hwsim/wpan-hwsim.c
> +++ b/wpan-hwsim/wpan-hwsim.c
> @@ -382,7 +382,7 @@ static void print_version(void)
>  
>  int main(int argc, const char *argv[])
>  {
> -	unsigned long int idx, idx2, lqi, ignore_idx = ULONG_MAX;
> +	unsigned long int idx, idx2, lqi = 0, ignore_idx = ULONG_MAX;
>  	bool dot = false;
>  	int cmd;
>  	int rc;
> 

No complains and trivial enough. Applied to wpan-tools master.

regards
Stefan Schmidt



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux