void *tmp;
unsigned int count;
- for (count = 0; list[count]; count++);
+ for (count = 0; list[count]; count++)
+ ;
if (!(tmp = realloc(list, sizeof(struct sp_port *) * (count + 2))))
goto fail;
list = tmp;
#else
size_t bytes_read = 0;
- unsigned char *ptr = (unsigned char *) buf;
+ unsigned char *ptr = (unsigned char *)buf;
struct timeval start, delta, now, end = {0, 0};
int started = 0;
fd_set fds;
#else
struct timeval start, delta, now, end = {0, 0};
const struct timeval max_delta = {
- (INT_MAX / 1000), (INT_MAX % 1000) * 1000};
+ (INT_MAX / 1000), (INT_MAX % 1000) * 1000
+ };
int started = 0, timeout_overflow = 0;
int result, timeout_remaining_ms;
struct pollfd *pollfds;
RETURN_ERROR(SP_ERR_MEM, "pollfds malloc() failed");
for (i = 0; i < event_set->count; i++) {
- pollfds[i].fd = ((int *) event_set->handles)[i];
+ pollfds[i].fd = ((int *)event_set->handles)[i];
pollfds[i].events = 0;
pollfds[i].revents = 0;
if (event_set->masks[i] & SP_EVENT_RX_READY)
port->usb_pid = connection_info_ex->DeviceDescriptor.idProduct;
if (connection_info_ex->DeviceDescriptor.iManufacturer)
- port->usb_manufacturer = get_string_descriptor(hub_device,index,
+ port->usb_manufacturer = get_string_descriptor(hub_device, index,
connection_info_ex->DeviceDescriptor.iManufacturer);
if (connection_info_ex->DeviceDescriptor.iProduct)
port->usb_product = get_string_descriptor(hub_device, index,
continue;
}
RegCloseKey(device_key);
- value[sizeof(value)-1] = 0;
+ value[sizeof(value) - 1] = 0;
if (strcmp(value, port->name))
continue;