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 /include | |
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 'include')
-rw-r--r-- | include/pt-sun.h | 4 |
1 files changed, 2 insertions, 2 deletions
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; |