From 4a706e03ca5ddbe170fba436bffbcdcd2ad6d6b9 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 17 Oct 2018 13:25:10 -0500 Subject: [PATCH] xfs_logprint: fix shadow var in xlog_print_trans_buffer xlog_print_trans_buffer takes 'i' as an argument, but then uses it later as a local byte counter. Give the local var more useful, non-shadow name of "byte" Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- logprint/log_misc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/logprint/log_misc.c b/logprint/log_misc.c index 99d99201e..c325f0460 100644 --- a/logprint/log_misc.c +++ b/logprint/log_misc.c @@ -395,15 +395,15 @@ xlog_print_trans_buffer(char **ptr, int len, int *i, int num_ops) if (print_data) { uint *dp = (uint *)*ptr; int nums = be32_to_cpu(head->oh_len) >> 2; - int i = 0; + int byte = 0; - while (i < nums) { - if ((i % 8) == 0) - printf("%2x ", i); + while (byte < nums) { + if ((byte % 8) == 0) + printf("%2x ", byte); printf("%8x ", *dp); dp++; - i++; - if ((i % 8) == 0) + byte++; + if ((byte % 8) == 0) printf("\n"); } printf("\n"); -- 2.47.2