From c912d6f8d528ae4a12bce1a4c81a634f2e7b23e1 Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Fri, 7 Aug 2020 15:01:43 +0200 Subject: [PATCH] testj1939: print proper offset in the data damp without this patch we will always print "0008" on each line Signed-off-by: Oleksij Rempel --- testj1939.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testj1939.c b/testj1939.c index 8724349..be9680f 100644 --- a/testj1939.c +++ b/testj1939.c @@ -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]);