Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2]: src/sys/arch/mac68k/dev Cleaner check for offset to grf_mmap
details: https://anonhg.NetBSD.org/src/rev/dd995665f33c
branches: netbsd-2
changeset: 564427:dd995665f33c
user: scottr <scottr%NetBSD.org@localhost>
date: Wed Mar 08 23:25:04 2006 +0000
description:
Cleaner check for offset to grf_mmap
diffstat:
sys/arch/mac68k/dev/grf_compat.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diffs (35 lines):
diff -r 94208bbed73c -r dd995665f33c sys/arch/mac68k/dev/grf_compat.c
--- a/sys/arch/mac68k/dev/grf_compat.c Sun Feb 26 21:56:16 2006 +0000
+++ b/sys/arch/mac68k/dev/grf_compat.c Wed Mar 08 23:25:04 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_compat.c,v 1.13 2003/07/15 02:43:16 lukem Exp $ */
+/* $NetBSD: grf_compat.c,v 1.13.6.1 2006/03/08 23:25:04 scottr Exp $ */
/*
* Copyright (C) 1999 Scott Reynolds
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf_compat.c,v 1.13 2003/07/15 02:43:16 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf_compat.c,v 1.13.6.1 2006/03/08 23:25:04 scottr Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -324,13 +324,10 @@
dc = sc->mfb_sc->sc_dc;
- if (off >= 0 &&
- off < m68k_round_page(dc->dc_offset + dc->dc_size))
- addr = m68k_btop(dc->dc_paddr + off);
- else
- addr = (-1); /* XXX bogus */
+ if ((u_int)off < m68k_round_page(dc->dc_offset + dc->dc_size))
+ return m68k_btop(dc->dc_paddr + off);
- return addr;
+ return (-1);
}
int
Home |
Main Index |
Thread Index |
Old Index