On Wed, 22 Aug 2012, Hans de Goede wrote:

> >> +          if ((dc.flags & USBDEVFS_DISCONNECT_CLAIM_IF_DRIVER) &&
> >> +                  strncmp(dc.driver, intf->dev.driver->name,
> >> +                          sizeof(dc.driver)) != 0)
> >> +                  return -EBUSY;
> >> +
> >> +          if ((dc.flags & USBDEVFS_DISCONNECT_CLAIM_EXCEPT_DRIVER) &&
> >> +                  strncmp(dc.driver, intf->dev.driver->name,
> >> +                          sizeof(dc.driver)) == 0)
> >> +                  return -EBUSY;
> >
> > Please don't indent continuation lines by exactly one tab stop.  It
> > makes them look like the start of a sub-block.
> 
> Ok, so you want 4 spaces there to but the 's' of strncmp below the second
> '(' I assume? I actually had that first, then changed to this :)

My style isn't always the same.  Most of the time I indent continuation
lines by 2 extra tab stops.  Sometimes I indent them by 1/2 tab stop (4
columns), especially when the length would otherwise go way over the
80-column limit.

In this case I would do:

                if ((dc.flags & USBDEVFS_DISCONNECT_CLAIM_EXCEPT_DRIVER) &&
                                strncmp(dc.driver, intf->dev.driver->name,
                                        sizeof(dc.driver)) == 0)
                        return -EBUSY;

If you prefer something else, that's okay.  Just don't put the
"strncmp" in the same column as the "return".

> Before I respin the patch, any other remarks from you?

No, everything else seems okay.

Alan Stern


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to