public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xail idbg command doesn't increment count in each loop
@ 2008-09-19  2:38 Lachlan McIlroy
  2008-09-19  4:19 ` Timothy Shimmin
  0 siblings, 1 reply; 2+ messages in thread
From: Lachlan McIlroy @ 2008-09-19  2:38 UTC (permalink / raw)
  To: xfs-oss, xfs-dev

count is never incremented on each log item because it is unreachable code.

--- a/fs/xfs/xfsidbg.c	2008-09-19 12:27:05.000000000 +1000
+++ b/fs/xfs/xfsidbg.c	2008-09-16 12:34:12.000000000 +1000
@@ -6249,8 +6249,8 @@ xfsidbg_xaildump(xfs_mount_t *mp)
 		default:
 			kdb_printf("Unknown item type %d\n", lip->li_type);
 			break;
-		count++;
 		}
+		count++;
 	}
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xail idbg command doesn't increment count in each loop
  2008-09-19  2:38 [PATCH] xail idbg command doesn't increment count in each loop Lachlan McIlroy
@ 2008-09-19  4:19 ` Timothy Shimmin
  0 siblings, 0 replies; 2+ messages in thread
From: Timothy Shimmin @ 2008-09-19  4:19 UTC (permalink / raw)
  To: lachlan; +Cc: xfs-oss, xfs-dev

Lachlan McIlroy wrote:
> count is never incremented on each log item because it is unreachable code.
> 
> --- a/fs/xfs/xfsidbg.c    2008-09-19 12:27:05.000000000 +1000
> +++ b/fs/xfs/xfsidbg.c    2008-09-16 12:34:12.000000000 +1000
> @@ -6249,8 +6249,8 @@ xfsidbg_xaildump(xfs_mount_t *mp)
>         default:
>             kdb_printf("Unknown item type %d\n", lip->li_type);
>             break;
> -        count++;
>         }
> +        count++;
>     }
> }
Oops - count++ after break.

Looks good.

--Tim

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-19  4:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-19  2:38 [PATCH] xail idbg command doesn't increment count in each loop Lachlan McIlroy
2008-09-19  4:19 ` Timothy Shimmin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox