diff options
author | Karel Zak | 2018-07-20 15:03:01 +0200 |
---|---|---|
committer | Karel Zak | 2018-07-20 15:05:32 +0200 |
commit | 47afae0caaa2b3440d6ac812079e3ada5f2aa0bd (patch) | |
tree | 41d909f1e6bebde8df48f4a5dfa279b63cefe841 /libblkid/src/superblocks/zfs.c | |
parent | include/all-io: const cleanup (diff) | |
download | kernel-qcow2-util-linux-47afae0caaa2b3440d6ac812079e3ada5f2aa0bd.tar.gz kernel-qcow2-util-linux-47afae0caaa2b3440d6ac812079e3ada5f2aa0bd.tar.xz kernel-qcow2-util-linux-47afae0caaa2b3440d6ac812079e3ada5f2aa0bd.zip |
libblkid: const qualifier cleanup
* use "const" in functions where we don't modify arguments
* use "const" when cast from const buffer to any struct (superblock etc.)
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/superblocks/zfs.c')
-rw-r--r-- | libblkid/src/superblocks/zfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libblkid/src/superblocks/zfs.c b/libblkid/src/superblocks/zfs.c index ec3e1c5bf..1292b303b 100644 --- a/libblkid/src/superblocks/zfs.c +++ b/libblkid/src/superblocks/zfs.c @@ -186,12 +186,12 @@ 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((uint64_t)UBERBLOCK_MAGIC); - struct zfs_uberblock *ub; + const struct zfs_uberblock *ub; int i, found = 0; loff_t offset = VDEV_LABEL_UBERBLOCK; for (i = 0; i < UBERBLOCKS_COUNT; i++, offset += UBERBLOCK_SIZE) { - ub = (struct zfs_uberblock *)((char *) label + offset); + ub = (const struct zfs_uberblock *)((const char *) label + offset); if (ub->ub_magic == UBERBLOCK_MAGIC) { *ub_offset = offset; |