In the macro xfs_isset, the variable 'a' is a pointer to an array
type. However, the bit offset calculation uses sizeof(a), which
returns the size of the pointer, not the size of an array element.
Fix this, which also fixes the problem where xfs_check spits out
bogus "rtblock X expected type unknown, got rtfree" messages.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
#define XFS_SUPER_MAGIC 0x58465342
#endif
-#define xfs_isset(a,i) ((a)[(i)/(sizeof((a))*NBBY)] & (1<<((i)%(sizeof((a))*NBBY))))
+#define xfs_isset(a,i) ((a)[(i)/(sizeof(*(a))*NBBY)] & (1ULL<<((i)%(sizeof(*(a))*NBBY))))
/*
* Argument structure for libxfs_init().