Changeset 2e85b3c in mainline for uspace/lib/usb/src/usbdrv.c


Ignore:
Timestamp:
2011-02-16T18:22:43Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f4c87aa9
Parents:
600733e (diff), ec59693 (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:

Development branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/usbdrv.c

    r600733e r2e85b3c  
    464464        assert(setup_packet != NULL);
    465465        assert(setup_packet_size > 0);
    466         assert(buffer != NULL);
    467         assert(buffer_size > 0);
     466        assert(((buffer != NULL) && (buffer_size > 0))
     467            || ((buffer == NULL) && (buffer_size == 0)));
    468468        assert(handle != NULL);
    469469
     
    494494        }
    495495
    496         rc = async_data_write_start(phone, buffer, buffer_size);
    497         if (rc != EOK) {
    498                 async_wait_for(transfer->request, NULL);
    499                 return rc;
     496        if (buffer_size > 0) {
     497                rc = async_data_write_start(phone, buffer, buffer_size);
     498                if (rc != EOK) {
     499                        async_wait_for(transfer->request, NULL);
     500                        return rc;
     501                }
    500502        }
    501503
Note: See TracChangeset for help on using the changeset viewer.