From 8758f2e24fecc1217def61b3199c29e178c567e4 Mon Sep 17 00:00:00 2001 From: christos Date: Tue, 6 Feb 2024 20:25:11 +0000 Subject: [PATCH] check the right variable --- sbin/gpt/resizedisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/gpt/resizedisk.c b/sbin/gpt/resizedisk.c index 98a8dfd24441..fd37b6203ecf 100644 --- a/sbin/gpt/resizedisk.c +++ b/sbin/gpt/resizedisk.c @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: resizedisk.c,v 1.20 2022/11/22 00:25:52 mlelstv Exp $"); +__RCSID("$NetBSD: resizedisk.c,v 1.21 2024/02/06 20:25:11 christos Exp $"); #endif #include @@ -107,7 +107,7 @@ resizedisk(gpt_t gpt, off_t sector, off_t size, bool quiet) mbr = mbrmap->map_data; gpt->gpt = map_find(gpt, MAP_TYPE_PRI_GPT_HDR); - if (gpt == NULL) { + if (gpt->gpt == NULL) { gpt_warnx(gpt, "No primary GPT header; run create or recover"); return -1; }