From 482578bcf29b8d3dfe299991142c14a55ec37323 Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 29 Mar 2023 15:55:34 +0000 Subject: [PATCH] No need to assume a nil GUID can be found at gpt_types[0]. Just use uuid_create_nil(). No functional change. --- sbin/fdisk/part.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/fdisk/part.c b/sbin/fdisk/part.c index 3597e326fb8..ef2bf129e15 100644 --- a/sbin/fdisk/part.c +++ b/sbin/fdisk/part.c @@ -1,4 +1,4 @@ -/* $OpenBSD: part.c,v 1.140 2023/03/29 14:20:50 krw Exp $ */ +/* $OpenBSD: part.c,v 1.141 2023/03/29 15:55:34 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -550,7 +550,7 @@ PRT_type_to_guid(const int type) if (i < entries) uuid_from_string(gpt_types[i].gt_guid, &guid, &status); if (i == entries || status != uuid_s_ok) - uuid_from_string(gpt_types[0].gt_guid, &guid, &status); + uuid_create_nil(&guid, NULL); return &guid; } -- 2.20.1