summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2004-07-03 20:36:05 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2004-07-03 20:36:05 +0000
commit953fd88454fda0aa4a69b0458f37a47581299aa3 (patch)
tree63901383d89b5a9ca85e1c4e5d6abdb8f93323a5 /sys/arch/amd64
parente8dafcec0871dc1b03a7698e97a87e3993051913 (diff)
Check return value instead of uninitialized variable.
ok deraadt@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/machdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index e0caab7883e..6d9e0be645a 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.26 2004/06/25 11:03:27 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.27 2004/07/03 20:36:04 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -1034,7 +1034,6 @@ dumpsys()
{
u_long totalbytesleft, bytes, i, n, memseg;
u_long maddr;
- int psize;
daddr_t blkno;
int (*dump)(dev_t, daddr_t, caddr_t, size_t);
int error;
@@ -1061,7 +1060,7 @@ dumpsys()
error = (*bdevsw[major(dumpdev)].d_psize)(dumpdev);
printf("dump ");
- if (psize == -1) {
+ if (error == -1) {
printf("area unavailable\n");
return;
}