summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-11-10 23:01:38 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-11-10 23:01:38 +0000
commit1933d78da59b5965adbc223b5080c31b47081259 (patch)
tree79338c78361abd970d71043790ef3d2f1fcff5a6
parentae3ff343f09da4e2f1b63dd4dde8d283848becd0 (diff)
Fix length calculation
-rw-r--r--tools/csr_usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/csr_usb.c b/tools/csr_usb.c
index 3e2a4144..617e7ccf 100644
--- a/tools/csr_usb.c
+++ b/tools/csr_usb.c
@@ -144,7 +144,7 @@ static int do_command(uint16_t command, uint16_t seqnum, uint16_t varid, uint8_t
do {
len = usb_interrupt_read(udev, 0x81,
- (void *) (rp + offset), sizeof(rp), 10);
+ (void *) (rp + offset), sizeof(rp) - offset, 10);
offset += len;
} while (len > 0);