libblkid: (zfs) add cast to fix UB [cppcheck]

[libblkid/src/superblocks/zfs.c:173]: (error) Shifting 32-bit value by 56 bits is undefined behaviour
[libblkid/src/superblocks/zfs.c:173]: (error) Shifting 32-bit value by 40 bits is undefined behaviour
This commit is contained in:
Boris Egorov 2016-01-19 11:37:57 +06:00
parent 7675d69d01
commit 18b76be61c
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ static void zfs_extract_guid_name(blkid_probe pr, loff_t offset)
static int find_uberblocks(const void *label, loff_t *ub_offset, int *swap_endian)
{
uint64_t swab_magic = swab64(UBERBLOCK_MAGIC);
uint64_t swab_magic = swab64((uint64_t)UBERBLOCK_MAGIC);
struct zfs_uberblock *ub;
int i, found = 0;
loff_t offset = VDEV_LABEL_UBERBLOCK;