Changeset ad5f149 in mainline for uspace/drv/bus/usb/uhci/hc.c


Ignore:
Timestamp:
2013-12-31T01:21:35Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
643e7ba
Parents:
639db552
Message:

uhci: Use foreach_safe to iterate through list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/hc.c

    r639db552 rad5f149  
    162162                    &instance->transfers_bulk_full, &done);
    163163
    164                 while (!list_empty(&done)) {
    165                         link_t *item = list_first(&done);
    166                         list_remove(item);
     164                list_foreach_safe(done, current, next) {
     165                        list_remove(current);
    167166                        uhci_transfer_batch_t *batch =
    168                             uhci_transfer_batch_from_link(item);
     167                            uhci_transfer_batch_from_link(current);
    169168                        uhci_transfer_batch_finish_dispose(batch);
    170169                }
Note: See TracChangeset for help on using the changeset viewer.