[PATCH 14/18] xfs_logprint: fix shadow var in xlog_print_trans_buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <sandeen@xxxxxxxxxx>
---
 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 99d9920..c325f04 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");
-- 
1.8.3.1




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux