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:
parent
7675d69d01
commit
18b76be61c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue