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

Changeset 64e3dad in mainline


Ignore:
Timestamp:
2011-12-14T21:50:02Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
66ee26a
Parents:
441633f
Message:

libusbdev: No need for special handling of NULL corner case.

Counting works on NULL endpoints pointer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/devdrv.c

    r441633f r64e3dad  
    8686{
    8787        size_t count;
    88         for (count = 0; endpoints && endpoints[count] != NULL; ++count);
     88        for (count = 0; endpoints != NULL && endpoints[count] != NULL; ++count);
    8989        return count;
    9090}
     
    100100{
    101101        assert(dev);
    102 
    103         if (endpoints == NULL) {
    104                 dev->pipes = NULL;
    105                 dev->pipes_count = 0;
    106                 return EOK;
    107         }
    108102
    109103        usb_endpoint_mapping_t *pipes = NULL;
     
    324318{
    325319        assert(wire != NULL);
    326         assert(endpoints != NULL);
    327320        assert(config_descr != NULL);
    328321        assert(config_descr_size > 0);
Note: See TracChangeset for help on using the changeset viewer.