From: Karel Zak Date: Thu, 5 Jan 2017 11:36:08 +0000 (+0100) Subject: libfdisk: (sun) use self_label() X-Git-Tag: v2.30-rc1~318 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e213a8e5a39fbe19082e16b2616f1b02cf673d32;p=thirdparty%2Futil-linux.git libfdisk: (sun) use self_label() Signed-off-by: Karel Zak --- diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c index 55ec8773ca..d6a71b6e6f 100644 --- a/libfdisk/src/sun.c +++ b/libfdisk/src/sun.c @@ -120,7 +120,7 @@ static int sun_probe_label(struct fdisk_context *cxt) assert(fdisk_is_label(cxt, SUN)); /* map first sector to header */ - sun = (struct fdisk_sun_label *) cxt->label; + sun = self_label(cxt); sun->header = (struct sun_disklabel *) cxt->firstsector; sunlabel = sun->header; @@ -213,7 +213,7 @@ static int sun_create_disklabel(struct fdisk_context *cxt) if (rc) return rc; - sun = (struct fdisk_sun_label *) cxt->label; + sun = self_label(cxt); sun->header = (struct sun_disklabel *) cxt->firstsector; sunlabel = sun->header;