cuda: fix len calculation in cuda_adb_req When advancing buffer by 1, len should be shorthened by appropriate amount, instead of setting it to -1. Found with cppcheck. Signed-off-by: Amadeusz Sławiński <amade@asmblr.net> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
diff --git a/drivers/cuda.c b/drivers/cuda.c index 86d2ddb..93a935a 100644 --- a/drivers/cuda.c +++ b/drivers/cuda.c
@@ -162,7 +162,7 @@ } } else { pos = buffer + 1; - len = -1; + len -= 1; } memcpy(rcv_buf, pos, len);