use the new fakeTransferPointer function to allocate a fake transfer

struct.
This commit is contained in:
Sebastian Zagrodzki
2017-04-27 03:12:25 +02:00
parent b9dabf4da9
commit 462651f20f

View File

@@ -262,7 +262,7 @@ func (f *fakeLibusb) setAlt(d *libusbDevHandle, intf, alt uint8) error {
func (f *fakeLibusb) alloc(_ *libusbDevHandle, _ *EndpointInfo, _ time.Duration, _ int, buf []byte, done chan struct{}) (*libusbTransfer, error) {
f.mu.Lock()
defer f.mu.Unlock()
t := new(libusbTransfer)
t := newFakeTransferPointer()
f.ts[t] = &fakeTransfer{buf: buf, done: done}
return t, nil
}