lkml.org 
[lkml]   [2009]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] Fix dubious bitwise 'and' usage spotted by sparse.
2009/1/9 Alexey Zaytsev <alexey.zaytsev@gmail.com>:
> It doesn't change the semantics, but clearly
> the logical 'and' was meant to be used here.
>
> Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
> ---
> drivers/usb/wusbcore/security.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/wusbcore/security.c b/drivers/usb/wusbcore/security.c
> index a101cad..8f953ab 100644
> --- a/drivers/usb/wusbcore/security.c
> +++ b/drivers/usb/wusbcore/security.c
> @@ -626,7 +626,7 @@ void wusbhc_gtk_rekey(struct wusbhc *wusbhc)
> struct wusb_dev *wusb_dev;
>
> wusb_dev = wusbhc->port[p].wusb_dev;
> - if (!wusb_dev || !wusb_dev->usb_dev | !wusb_dev->usb_dev->authenticated)
> + if (!wusb_dev || !wusb_dev->usb_dev || !wusb_dev->usb_dev->authenticated)
> continue;
>
> usb_fill_control_urb(wusb_dev->set_gtk_urb, wusb_dev->usb_dev,
>

Hi Alexey,

This one is a logical 'or'... your changelog says 'and'!

--
Tom Spink
Douglas William Jerrold - "The only athletic sport I ever mastered
was backgammon."


\
 
 \ /
  Last update: 2009-01-10 10:49    [W:0.060 / U:3.100 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site