No need to assume a nil GUID can be found at gpt_types[0]. Just
authorkrw <krw@openbsd.org>
Wed, 29 Mar 2023 15:55:34 +0000 (15:55 +0000)
committerkrw <krw@openbsd.org>
Wed, 29 Mar 2023 15:55:34 +0000 (15:55 +0000)
use uuid_create_nil().

No functional change.

sbin/fdisk/part.c

index 3597e32..ef2bf12 100644 (file)
@@ -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;
 }