From 8ab0edfe0d72f0aedf22a4e482af3400bcf6f102 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Mon, 17 Apr 2023 11:38:26 +0200 Subject: [PATCH] libblkid: xfs: clean up call to ul_crc32_exclude_offset MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Weißschuh --- libblkid/src/superblocks/xfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) -- 2.47.3