From e213a8e5a39fbe19082e16b2616f1b02cf673d32 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 5 Jan 2017 12:36:08 +0100 Subject: [PATCH] libfdisk: (sun) use self_label() Signed-off-by: Karel Zak --- libfdisk/src/sun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.47.3