Blob Blame History Raw
--- ntfsprogs/ntfsck.c.old	2013-01-13 07:46:35.000000000 +0100
+++ ntfsprogs/ntfsck.c	2013-04-13 12:04:06.000000000 +0200
@@ -616,9 +616,9 @@
 
 	// Remove update seq & check it.
 	usa = *(u16*)(buffer+usa_ofs); // The value that should be at the end of every sector.
-	assert_u32_equal(usa_count-1, buflen/bytes_per_sector, "USA length");
+	assert_u32_equal(usa_count-1, buflen/NTFS_BLOCK_SIZE, "USA length");
 	for (i=1;i<usa_count;i++) {
-		u16 *fixup = (u16*)(buffer+bytes_per_sector*i-2); // the value at the end of the sector.
+		u16 *fixup = (u16*)(buffer+NTFS_BLOCK_SIZE*i-2); // the value at the end of the sector.
 		u16 saved_val = *(u16*)(buffer+usa_ofs+2*i); // the actual data value that was saved in the us array.
 
 		assert_u32_equal(*fixup, usa, "fixup");