testj1939: print proper offset in the data damp

without this patch we will always print "0008" on each line

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
pull/232/head
Oleksij Rempel 2020-08-07 15:01:43 +02:00
parent 327587b2c8
commit c912d6f8d5
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ int main(int argc, char *argv[])
peername.can_addr.j1939.pgn);
for (i = 0, j = 0; i < ret; ++i, j++) {
if (j == 8) {
printf("\n%05x ", j);
printf("\n%05x ", i);
j = 0;
}
printf(" %02x", dat[i]);