diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2021-07-22 13:30:41 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2021-07-22 13:30:41 +0000 |
commit | 8e5f112bfabbaa884b5e778ff40cba39727e2d09 (patch) | |
tree | 233ebf2c34f8a82aac59ba4b3d3cff7472086157 /sbin/fdisk/part.c | |
parent | c03ec1bc4725a04f86ac486cf8308d062c6569b4 (diff) |
Have PRT_protected_guid() return 0/-1 like everything else
reporting success/failure.
No functional change.
Diffstat (limited to 'sbin/fdisk/part.c')
-rw-r--r-- | sbin/fdisk/part.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sbin/fdisk/part.c b/sbin/fdisk/part.c index 178e4126287..3deaf7b030c 100644 --- a/sbin/fdisk/part.c +++ b/sbin/fdisk/part.c @@ -1,4 +1,4 @@ -/* $OpenBSD: part.c,v 1.101 2021/07/19 23:24:54 krw Exp $ */ +/* $OpenBSD: part.c,v 1.102 2021/07/22 13:30:40 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -160,20 +160,19 @@ int PRT_protected_guid(const struct uuid *uuid) { char *str = NULL; - int rslt; + int rslt = 0; unsigned int i; uint32_t status; uuid_to_string(uuid, &str, &status); if (status != uuid_s_ok) { - rslt = 1; + rslt = -1; goto done; } - rslt = 0; for(i = 0; i < nitems(protected_guid); i++) { if (strncmp(str, protected_guid[i].pg_guid, UUID_STR_LEN) == 0) { - rslt = 1; + rslt = -1; break; } } |