diff options
author | 2015-09-09 13:51:55 +0000 | |
---|---|---|
committer | 2015-09-09 13:51:55 +0000 | |
commit | 1a155e1f1a71429f0f025bc24176e83569b2cd6f (patch) | |
tree | ec9e017a79f862d528a79074301362c0665ecfdd | |
parent | no comma after last entry in NAME; (diff) | |
download | wireguard-openbsd-1a155e1f1a71429f0f025bc24176e83569b2cd6f.tar.xz wireguard-openbsd-1a155e1f1a71429f0f025bc24176e83569b2cd6f.zip |
No need to check !xxboot inside a 'if (!xxboot) ...' block.
ok otto@ deraadt@
-rw-r--r-- | sbin/disklabel/disklabel.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index 832e6d467bf..447126d5c3b 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.204 2015/08/20 22:02:20 deraadt Exp $ */ +/* $OpenBSD: disklabel.c,v 1.205 2015/09/09 13:51:55 krw Exp $ */ /* * Copyright (c) 1987, 1993 @@ -543,17 +543,15 @@ makebootarea(char *boot, struct disklabel *dp) *np++ = *p++; *np++ = '\0'; - if (!xxboot) { - (void)snprintf(np, namebuf + sizeof namebuf - np, - "%s%sboot", _PATH_BOOTDIR, dkbasename); - if (access(np, F_OK) < 0 && dkbasename[0] == 'r') - dkbasename++; - xxboot = np; - (void)snprintf(xxboot, - namebuf + sizeof namebuf - np, - "%s%sboot", _PATH_BOOTDIR, dkbasename); - np += strlen(xxboot) + 1; - } + (void)snprintf(np, namebuf + sizeof namebuf - np, + "%s%sboot", _PATH_BOOTDIR, dkbasename); + if (access(np, F_OK) < 0 && dkbasename[0] == 'r') + dkbasename++; + xxboot = np; + (void)snprintf(xxboot, + namebuf + sizeof namebuf - np, + "%s%sboot", _PATH_BOOTDIR, dkbasename); + np += strlen(xxboot) + 1; } if (verbose) warnx("bootstrap: xxboot = %s", xxboot); |