summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2010-11-20 13:10:41 +0000
committerderaadt <deraadt@openbsd.org>2010-11-20 13:10:41 +0000
commit8389c933cb6d9726c4a0f08c9e802b227805d4d7 (patch)
treead387e78db0fef2d5e872e77267f49dbfae5d62f
parent/tmp/cvsaGVL4U (diff)
downloadwireguard-openbsd-8389c933cb6d9726c4a0f08c9e802b227805d4d7.tar.xz
wireguard-openbsd-8389c933cb6d9726c4a0f08c9e802b227805d4d7.zip
some more installboot cleanup from gapz@dud-t.org
-rw-r--r--sys/arch/mvme68k/stand/installboot/installboot.c4
-rw-r--r--sys/arch/mvme88k/stand/installboot/installboot.c6
-rw-r--r--sys/arch/sparc64/stand/installboot/installboot.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/mvme68k/stand/installboot/installboot.c b/sys/arch/mvme68k/stand/installboot/installboot.c
index c88e4095c4a..fadceec218c 100644
--- a/sys/arch/mvme68k/stand/installboot/installboot.c
+++ b/sys/arch/mvme68k/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.13 2010/11/19 18:11:19 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.14 2010/11/20 13:10:41 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
@@ -414,7 +414,7 @@ vid_to_disklabel(char *dkname, char *bootproto)
pcpul->version = 1;
strncpy(pcpul->vid_id, "M68K", 4);
- if (fstat(exe_file, &sb);
+ if (fstat(exe_file, &sb) == -1)
err(1, "fstat: %s", bootproto);
if (sb.st_size < 0x20)
errx(1, "%s is too small", bootproto);
diff --git a/sys/arch/mvme88k/stand/installboot/installboot.c b/sys/arch/mvme88k/stand/installboot/installboot.c
index 14ad8ae8772..c83a445a33d 100644
--- a/sys/arch/mvme88k/stand/installboot/installboot.c
+++ b/sys/arch/mvme88k/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.11 2010/11/19 18:11:21 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.12 2010/11/20 13:10:42 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
@@ -333,10 +333,10 @@ int devfd;
/* Sanity-check super-block. */
- if (fs->fs_magic != FS_MAGIC)
+ if (fs->fs_magic != FS_MAGIC)
errx(1, "Bad magic number in superblock");
- if (fs->fs_inopb <= 0)
+ if (fs->fs_inopb <= 0)
err(1, "Bad inopb=%d in superblock", fs->fs_inopb);
/* Read inode */
diff --git a/sys/arch/sparc64/stand/installboot/installboot.c b/sys/arch/sparc64/stand/installboot/installboot.c
index 0699cda4257..1b94d2193a9 100644
--- a/sys/arch/sparc64/stand/installboot/installboot.c
+++ b/sys/arch/sparc64/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.8 2010/11/19 18:11:21 deraadt Exp $ */
+/* $OpenBSD: installboot.c,v 1.9 2010/11/20 13:10:42 deraadt Exp $ */
/* $NetBSD: installboot.c,v 1.8 2001/02/19 22:48:59 cgd Exp $ */
/*-
@@ -194,7 +194,7 @@ main(argc, argv)
if ((protofd = open(proto, O_RDONLY)) < 0)
err(1, "open: %s", proto);
- if (fstat(protofd, &sb) < 0)
+ if (fstat(protofd, &sb) == -1)
err(1, "fstat: %s", proto);
if (sb.st_size == 0)
errx(1, "%s is empty", proto);