]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: cleanup sun label checksum usuage
authorRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 13 Jun 2017 01:16:02 +0000 (03:16 +0200)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 13 Jun 2017 16:06:36 +0000 (18:06 +0200)
commit7f387c5c215e7208a7217d528878fb5d3b2a7b5b
tree7fe020dc1b94c17c935cec30764603dca2f8a06f
parentc972852b29391c35b1d5c7d3e1e6413e0cc86908
libfdisk: cleanup sun label checksum usuage

We are using now the formerly unused function sun_pt_checksum(). This
cleanup was motivated by clang compiler warning, see below. Also nice
that we are now always using uint16_t instead of short.

Warning was:

../libfdisk/src/sun.c:177:35: warning: taking address of packed member 'csum' of class or structure 'sun_disklabel' may result in an unaligned pointer value
      [-Waddress-of-packed-member]
                while(ush < (unsigned short *)(&sunlabel->csum))

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
include/pt-sun.h
libfdisk/src/sun.c