From 47afae0caaa2b3440d6ac812079e3ada5f2aa0bd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 20 Jul 2018 15:03:01 +0200 Subject: 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 --- include/pt-sun.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/pt-sun.h b/include/pt-sun.h index e6a4ed13f..8bb5d950e 100644 --- a/include/pt-sun.h +++ b/include/pt-sun.h @@ -78,10 +78,10 @@ struct sun_disklabel { static inline uint16_t sun_pt_checksum(const struct sun_disklabel *label) { - uint16_t *ptr = ((uint16_t *) (label + 1)) - 1; + const uint16_t *ptr = ((const uint16_t *) (label + 1)) - 1; uint16_t sum; - for (sum = 0; ptr >= ((uint16_t *) label);) + for (sum = 0; ptr >= ((const uint16_t *) label);) sum ^= *ptr--; return sum; -- cgit v1.2.3-55-g7522