Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset e7df6cd in mainline


Ignore:
Timestamp:
2011-04-12T16:04:30Z (11 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial
Children:
56f8a04
Parents:
777e336
Message:

Added some asserts to static functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/usbhid.c

    r777e336 re7df6cd  
    6767static int usb_hid_set_boot_kbd_subdriver(usb_hid_dev_t *hid_dev)
    6868{
    69         assert(hid_dev->subdriver_count == 0);
     69        assert(hid_dev != NULL && hid_dev->subdriver_count == 0);
    7070       
    7171        hid_dev->subdrivers = (usb_hid_subdriver_t *)malloc(
     
    9797static int usb_hid_set_boot_mouse_subdriver(usb_hid_dev_t *hid_dev)
    9898{
    99         assert(hid_dev->subdriver_count == 0);
     99        assert(hid_dev != NULL && hid_dev->subdriver_count == 0);
    100100       
    101101        hid_dev->subdrivers = (usb_hid_subdriver_t *)malloc(
     
    127127static int usb_hid_set_generic_hid_subdriver(usb_hid_dev_t *hid_dev)
    128128{
    129         assert(hid_dev->subdriver_count == 0);
     129        assert(hid_dev != NULL && hid_dev->subdriver_count == 0);
    130130       
    131131        hid_dev->subdrivers = (usb_hid_subdriver_t *)malloc(
     
    232232static int usb_hid_find_subdrivers(usb_hid_dev_t *hid_dev)
    233233{
     234        assert(hid_dev != NULL);
     235       
    234236        const usb_hid_subdriver_t *subdrivers[USB_HID_MAX_SUBDRIVERS];
    235237       
     
    286288static int usb_hid_check_pipes(usb_hid_dev_t *hid_dev, usb_device_t *dev)
    287289{
     290        assert(hid_dev != NULL && dev != NULL);
     291       
    288292        int rc = EOK;
    289293       
Note: See TracChangeset for help on using the changeset viewer.