Hi all,
I'm just curious if there is any particular reason to use the following code
return !!*buf;
instead of the simple
return (int) *buf;
in function "uhci_hub_status_data", file: usb/host/uhci-hub.c
static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf)
{
struct uhci_hcd *uhci = hcd_to_uhci(hcd);
unsigned int io_addr = uhci->io_addr;
int i, len = 1;
*buf = 0;
for (i = 0; i < uhci->rh_numports; i++) {
*buf |= ((inw(io_addr + USBPORTSC1 + i * 2) & 0xa) > 0 ? (1 << (i +
1)) : 0);
len = (i + 1) / 8 + 1;
}
return !!*buf;
}
Little notes in code will be helpful.
Best regards,
sE
--
>> S. Effendi SEffendi @ sysgo . de
SYSGO Real-Time Solutions GmbH http://www.sysgo.de
Am Pfaffenstein 14 Tel. +49 6136 99 48 0
55270 Klein-Winternheim - Germany Fax. +49 6136 99 48 10
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel