diff options
author | markm <markm@FreeBSD.org> | 2000-06-25 17:26:47 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-06-25 17:26:47 +0000 |
commit | 1a54784cc224a2f2da7e7389ea31aed3629209a4 (patch) | |
tree | e21f636246686f09bf2082b506c73359ab653f21 /sys | |
parent | 03f53f17a26c442c42c7c772a7df667520513922 (diff) | |
download | FreeBSD-src-1a54784cc224a2f2da7e7389ea31aed3629209a4.zip FreeBSD-src-1a54784cc224a2f2da7e7389ea31aed3629209a4.tar.gz |
Fix an uninitialised variable and a function return value.
Reported by: dillon
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/mem.c | 5 | ||||
-rw-r--r-- | sys/i386/i386/mem.c | 5 |
2 files changed, 8 insertions, 2 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; } /* diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index 52e964c..a9538db 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/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; } /* |