Fix logging of Custom Write

This way we actually trace print the written buffer, even if the caller
doesn't care about how much data he/she actually wrote.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Anton Lundin 2017-01-08 09:18:45 +01:00 committed by Linus Torvalds
parent 534dd2f34b
commit 19b560d9b2
2 changed files with 2 additions and 2 deletions

View File

@ -690,7 +690,7 @@ dc_serial_write (dc_serial_t *device, const void *data, size_t size, size_t *act
if (actual)
*actual = nbytes;
},
write, data, size, actual);
write, data, size, &nbytes);
struct timeval tve, tvb;
if (device->halfduplex) {

View File

@ -474,7 +474,7 @@ dc_serial_write (dc_serial_t *device, const void *data, size_t size, size_t *act
if (actual)
*actual = nbytes;
},
write, data, size, actual);
write, data, size, &nbytes);
LARGE_INTEGER begin, end, freq;
if (device->halfduplex) {