From 4389aacfb648b8dd6607fe0f87fa4919eb1412db Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Wed, 29 Mar 2023 15:55:35 +0000 Subject: 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(-) (limited to 'sbin') 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; } -- cgit v1.2.3