From: Thomas Weißschuh Date: Mon, 17 Apr 2023 09:38:26 +0000 (+0200) Subject: libblkid: xfs: clean up call to ul_crc32_exclude_offset X-Git-Tag: v2.39-rc3~19^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8ab0edfe0d72f0aedf22a4e482af3400bcf6f102;p=thirdparty%2Futil-linux.git libblkid: xfs: clean up call to ul_crc32_exclude_offset Signed-off-by: Thomas Weißschuh --- diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c index 6ab47ef1e4..f0e099e57e 100644 --- a/libblkid/src/superblocks/xfs.c +++ b/libblkid/src/superblocks/xfs.c @@ -207,7 +207,6 @@ static int xfs_verify_sb(struct xfs_super_block *ondisk, blkid_probe pr, if ((sbp->sb_versionnum & 0x0f) == 5) { uint32_t expected, crc; unsigned char *csummed; - int crc_offset = offsetof(struct xfs_super_block, sb_crc); if (!(sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT)) return 0; @@ -220,7 +219,8 @@ static int xfs_verify_sb(struct xfs_super_block *ondisk, blkid_probe pr, return 0; crc = ul_crc32c_exclude_offset(~0LL, csummed, sbp->sb_sectsize, - crc_offset, sizeof(sbp->sb_crc)); + offsetof(struct xfs_super_block, sb_crc), + sizeof_member(struct xfs_super_block, sb_crc)); crc = bswap_32(crc ^ ~0LL); if (!blkid_probe_verify_csum(pr, crc, expected))