Changeset 4363000 in mainline for uspace/lib/usb/include/usb/usb.h


Ignore:
Timestamp:
2016-05-13T12:40:24Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9260102
Parents:
5012203
Message:

Make sure not to shift bits out of the width of the result

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/usb.h

    r5012203 r4363000  
    168168        ( \
    169169            _MAKE_PID_NIBBLE(tag, type) \
    170             | ((~_MAKE_PID_NIBBLE(tag, type)) << 4) \
     170            | (((~_MAKE_PID_NIBBLE(tag, type)) & 0xf) << 4) \
    171171        )
    172172        USB_PID_OUT = _MAKE_PID(0, 1),
Note: See TracChangeset for help on using the changeset viewer.