Skip to contentSkip to conversation

xail idbg command doesn't increment count in each loop

PATCH In review Lachlan McIlroy 2 participants 2 messages Sep 19, 2008 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xail idbg command doesn't increment count in each loop

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

fs/xfs/xfsidbg.c +0 -0
@@ -6249,8 +6249,8 @@ xfsidbg_xaildump(xfs_mount_t *mp)
		default:
			kdb_printf("Unknown item type %d\n", lip->li_type);
			break;
-		count++;
		}
+		count++;
	}
}
#1 lore raw

fs/xfs/xfsidbg.c 2008-09-16 12:34:12.000000000 +1000 xfsidbg_xaildump(xfs_mount_t *mp) · line 6255

Quoted 13 lines · Lachlan McIlroy

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

fs/xfs/xfsidbg.c 2008-09-16 12:34:12.000000000 +1000 renamed from fs/xfs/xfsidbg.c 2008-09-19 12:27:05.000000000 +1000 +1 -1
@@ -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