diff options
author | Pete Batard <pbatard@gmail.com> | 2010-01-14 01:35:29 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-01-14 01:35:29 +0000 |
commit | aace9f53a05a8ce996bbfec89e88895ca8b9e755 (patch) | |
tree | 644d4b67486eeb9ccaf37199d4f5f2421379b58b | |
parent | 71613013b9e7329b4e49047abdee40fea718eb96 (diff) | |
download | libusb-aace9f53a05a8ce996bbfec89e88895ca8b9e755.tar.gz |
svn r55: - fixes list_for_each_entry calls for Darwin and Linux
-rw-r--r-- | libusb/io.c | 2 | ||||
-rw-r--r-- | libusb/os/darwin_usb.c | 4 | ||||
-rw-r--r-- | libusb/os/linux_usbfs.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/libusb/io.c b/libusb/io.c index 2e59f72..50fd532 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -1321,7 +1321,7 @@ static int arm_timerfd_for_next_timeout(struct libusb_context *ctx) { struct usbi_transfer *transfer; - list_for_each_entry(transfer, &ctx->flying_transfers, list) { + list_for_each_entry(transfer, &ctx->flying_transfers, list, struct usbi_transfer) { struct timeval *cur_tv = &transfer->timeout; /* if we've reached transfers of infinite timeout, then we have no diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c index dfae564..de3e9a6 100644 --- a/libusb/os/darwin_usb.c +++ b/libusb/os/darwin_usb.c @@ -229,7 +229,7 @@ static void darwin_devices_detached (void *ptr, io_iterator_t rem_devices) { IOObjectRelease (device); pthread_mutex_lock(&ctx->open_devs_lock); - list_for_each_entry(handle, &ctx->open_devs, list) { + list_for_each_entry(handle, &ctx->open_devs, list, struct libusb_device_handle) { dpriv = (struct darwin_device_priv *)handle->dev->os_priv; /* the device may have been opened several times. write to each handle's event descriptor */ @@ -1449,7 +1449,7 @@ static int op_handle_events(struct libusb_context *ctx, struct pollfd *fds, nfds continue; num_ready--; - list_for_each_entry(handle, &ctx->open_devs, list) { + list_for_each_entry(handle, &ctx->open_devs, list, struct libusb_device_handle) { hpriv = (struct darwin_device_handle_priv *)handle->os_priv; if (hpriv->fds[0] == pollfd->fd) break; diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c index ffa4088..3888aa9 100644 --- a/libusb/os/linux_usbfs.c +++ b/libusb/os/linux_usbfs.c @@ -2097,7 +2097,7 @@ static int op_handle_events(struct libusb_context *ctx, continue; num_ready--; - list_for_each_entry(handle, &ctx->open_devs, list) { + list_for_each_entry(handle, &ctx->open_devs, list, struct libusb_device_handle) { hpriv = __device_handle_priv(handle); if (hpriv->fd == pollfd->fd) break; |