summaryrefslogtreecommitdiff
path: root/lkm/ap
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-12-21 22:23:53 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-12-21 22:23:53 +0000
commitc60e06beeb20521a15bacc5c672aa1b865b06a67 (patch)
treef2cc3a0e68a020f5e59132403d4a16547626359f /lkm/ap
parentf2d04b4c3d006dcc05c58dab6068fed44f01098a (diff)
-Wall madness.
Diffstat (limited to 'lkm/ap')
-rw-r--r--lkm/ap/aperture.c6
-rw-r--r--lkm/ap/aptest/aptest.c4
2 files changed, 4 insertions, 6 deletions
diff --git a/lkm/ap/aperture.c b/lkm/ap/aperture.c
index 09de3223ffb..89543c1f386 100644
--- a/lkm/ap/aperture.c
+++ b/lkm/ap/aperture.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aperture.c,v 1.1 1996/03/05 11:25:29 mickey Exp $ */
+/* $OpenBSD: aperture.c,v 1.2 1996/12/21 22:23:38 millert Exp $ */
/*
* Copyright 1994 the XFree86 Project Inc.
@@ -25,8 +25,6 @@ static int ap_open_count = 0;
int
apopen(dev_t dev, int oflags, int devtype, struct proc *p)
{
- struct pcred *pc = p->p_cred;
-
if (suser(p->p_ucred, &p->p_acflag) != 0) {
return(EPERM);
}
@@ -64,7 +62,7 @@ apmmap(dev_t dev, int offset, int length)
printf("apmmap: addr 0x%x\n", offset);
#endif
if ((minor(dev) == 0)
- && (offset >= VGA_START && offset <= VGA_END
+ && ((offset >= VGA_START && offset <= VGA_END)
|| (unsigned)offset > (unsigned)ctob(physmem))) {
return i386_btop(offset);
} else {
diff --git a/lkm/ap/aptest/aptest.c b/lkm/ap/aptest/aptest.c
index ed73cdd28ab..5dcccfb9d39 100644
--- a/lkm/ap/aptest/aptest.c
+++ b/lkm/ap/aptest/aptest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aptest.c,v 1.1 1996/03/05 11:25:46 mickey Exp $ */
+/* $OpenBSD: aptest.c,v 1.2 1996/12/21 22:23:39 millert Exp $ */
/*
* Copyright 1994 Doug Anson, danson@lgc.com & David Holland, davidh@use.com
*
@@ -108,7 +108,7 @@ int main(int argc,char **argv)
printf("%c",addr[i]);
/* printf("addr[%d]=%c\n",i,addr[i]);
*/
- printf("\nDONE displaying memory contents (%d bytes)\n",stop);
+ printf("\nDONE displaying memory contents (%ld bytes)\n",stop);
/* unmap and close */
printf("UNMAPPING [0x%x ,size=%d) to addr=0x%x... and closing...",