On Tue, Jan 25, 2011 at 05:33:27PM +0200, Tomas Winkler wrote:
>       pusb_interface_descriptor = &(pusb_host_interface->desc);
> -     if ((struct usb_interface_descriptor *)NULL ==
> +     if (NULL ==
>                                               pusb_interface_descriptor) {

You could move the if condition onto one line now.

> -                     if ((void *)NULL != peasycap->field_buffer[k][m].pgo) {
> +                     if (NULL != peasycap->field_buffer[k][m].pgo) {

Btw.  Am I the only person who gets confused by all the double
negatives?  If false is not equal to peasycap->field_buffer[k][m].pgo
then ... vs if peasycap->field_buffer[k][m].pgo ... ?  It's more
idiomatic to say: if (foo) { ... and if (!foo) { ... 

> -                     if ((struct data_urb *)NULL != pdata_urb) {
> -                             if ((struct urb *)NULL !=
> +                     if (NULL != pdata_urb) {
> +                             if (NULL !=
>                                               pdata_urb->purb) {

Same here.  Move this to one line.

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to