Changeset f9014bc in mainline


Ignore:
Timestamp:
2011-02-09T10:27:44Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f96aefc
Parents:
2964aa87
Message:

Fixes: is_active should compare to 0 conversion to bool does not work as expected

minor refactoring

Location:
uspace/drv/uhci-hcd/uhci_struct
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.c

    r2964aa87 rf9014bc  
    4444        assert(instance);
    4545
    46         instance->next =
    47           0 | LINK_POINTER_TERMINATE_FLAG;
     46        instance->next = 0 | LINK_POINTER_TERMINATE_FLAG;
    4847
    49         assert(size < 1024);
    5048        instance->status = 0
    5149          | ((error_count & TD_STATUS_ERROR_COUNT_MASK) << TD_STATUS_ERROR_COUNT_POS)
    5250          | TD_STATUS_ERROR_ACTIVE;
    5351
     52        assert(size < 1024);
    5453        instance->device = 0
    5554                | (((size - 1) & TD_DEVICE_MAXLEN_MASK) << TD_DEVICE_MAXLEN_POS)
  • uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.h

    r2964aa87 rf9014bc  
    101101{
    102102        assert(instance);
    103         return instance->status & TD_STATUS_ERROR_ACTIVE;
     103        return (instance->status & TD_STATUS_ERROR_ACTIVE) != 0;
    104104}
    105105#endif
Note: See TracChangeset for help on using the changeset viewer.