Changeset 54464f6a in mainline for uspace/lib/usbhid/src/consumer.c


Ignore:
Timestamp:
2011-11-11T19:48:33Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
50a01a9
Parents:
c2e50d7 (diff), 747ef72 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhid/src/consumer.c

    rc2e50d7 r54464f6a  
    3838#include <usb/hid/usages/consumer.h>
    3939
    40 static const char *usbhid_consumer_usage_str[0x29d] = {
     40static const char *usbhid_consumer_usage_str[] = {
    4141        [0x01] = "Consumer Control",
    4242        [0x02] = "Numeric Key Pad",
     
    358358        [0x13e] = "Reserved",
    359359        [0x13f] = "Reserved",
    360         [0x140] = "Reserved", 
     360        [0x140] = "Reserved",
    361361        [0x141] = "Reserved",
    362362        [0x142] = "Reserved",
     
    717717 * @retval HelenOS key code corresponding to the given USB Consumer Page Usage.
    718718 */
    719 const char *usbhid_multimedia_usage_to_str(int usage)
     719const char *usbhid_multimedia_usage_to_str(unsigned usage)
    720720{
    721         size_t map_length = sizeof(usbhid_consumer_usage_str) / sizeof(char *);
     721        static const size_t map_length =
     722            sizeof(usbhid_consumer_usage_str) / sizeof(char *);
    722723
    723         if ((usage < 0) || ((size_t)usage >= map_length))
     724        if (usage >= map_length)
    724725                return "Unknown usage";
    725726
    726         /*! @todo What if the usage is not in the table? */
    727727        return usbhid_consumer_usage_str[usage];
    728728}
Note: See TracChangeset for help on using the changeset viewer.