summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authordrochner <drochner@NetBSD.org>2004-08-02 13:04:58 +0000
committerdrochner <drochner@NetBSD.org>2004-08-02 13:04:58 +0000
commitf0a8ebbee2e645bda0a542e08ad63d13fdfb695a (patch)
treeeaa110079230f307b071ac982e95145281310c38 /sys
parent48d5d4bd2088c200b4c7844034b107ad6219f086 (diff)
avoid a questionable pointer type cast
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/vme/vme.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/vme/vme.c b/sys/dev/vme/vme.c
index a0c4a3917ff..7794b9adcc8 100644
--- a/sys/dev/vme/vme.c
+++ b/sys/dev/vme/vme.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vme.c,v 1.11 2004/07/29 18:39:00 drochner Exp $ */
+/* $NetBSD: vme.c,v 1.12 2004/08/02 13:04:58 drochner Exp $ */
/*
* Copyright (c) 1999
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vme.c,v 1.11 2004/07/29 18:39:00 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vme.c,v 1.12 2004/08/02 13:04:58 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -333,11 +333,15 @@ _vme_space_get(sc, len, ams, align, addr)
vme_addr_t *addr;
{
struct extent *ex;
+ u_long help;
+ int res;
ex = vme_select_map(sc, ams);
if (!ex)
return (EINVAL);
- return (extent_alloc(ex, len, align, EX_NOBOUNDARY, EX_NOWAIT,
- (u_long *)addr));
+ res = extent_alloc(ex, len, align, EX_NOBOUNDARY, EX_NOWAIT, &help);
+ if (!res)
+ *addr = help;
+ return (res);
}