summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/mem.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2000-06-25 17:26:47 +0000
committermarkm <markm@FreeBSD.org>2000-06-25 17:26:47 +0000
commit1a54784cc224a2f2da7e7389ea31aed3629209a4 (patch)
treee21f636246686f09bf2082b506c73359ab653f21 /sys/amd64/amd64/mem.c
parent03f53f17a26c442c42c7c772a7df667520513922 (diff)
downloadFreeBSD-src-1a54784cc224a2f2da7e7389ea31aed3629209a4.zip
FreeBSD-src-1a54784cc224a2f2da7e7389ea31aed3629209a4.tar.gz
Fix an uninitialised variable and a function return value.
Reported by: dillon
Diffstat (limited to 'sys/amd64/amd64/mem.c')
-rw-r--r--sys/amd64/amd64/mem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c
index 52e964c..a9538db 100644
--- a/sys/amd64/amd64/mem.c
+++ b/sys/amd64/amd64/mem.c
@@ -134,7 +134,7 @@ static int
mmrw(dev_t dev, struct uio *uio, int flags)
{
int o;
- u_int c, v;
+ u_int c = 0, v;
struct iovec *iov;
int error = 0;
vm_offset_t addr, eaddr;
@@ -218,6 +218,9 @@ memmmap(dev_t dev, vm_offset_t offset, int prot)
case 1:
return i386_btop(vtophys(offset));
}
+
+ default:
+ return -1;
}
/*
OpenPOWER on IntegriCloud