From 7cd2ca16b5a8da5bfc09903012e08fe638e557b4 Mon Sep 17 00:00:00 2001 From: bjh21 Date: Sat, 11 Nov 2006 17:28:16 +0000 Subject: COMPAT_10 implies COMPAT_11, so there's no need to test both. Also collapse two tightly-nested #ifs into one. --- sys/dev/wscons/wsdisplay_compat_usl.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/wscons/wsdisplay_compat_usl.c b/sys/dev/wscons/wsdisplay_compat_usl.c index ebb4837c98e..66121d30d22 100644 --- a/sys/dev/wscons/wsdisplay_compat_usl.c +++ b/sys/dev/wscons/wsdisplay_compat_usl.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_compat_usl.c,v 1.35 2006/10/12 01:32:06 christos Exp $ */ +/* $NetBSD: wsdisplay_compat_usl.c,v 1.36 2006/11/11 17:28:16 bjh21 Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.35 2006/10/12 01:32:06 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.36 2006/11/11 17:28:16 bjh21 Exp $"); #include "opt_compat_freebsd.h" #include "opt_compat_netbsd.h" @@ -405,17 +405,14 @@ wsdisplay_usl_ioctl2(struct wsdisplay_softc *sc, struct wsscreen *scr, #undef d case KDENABIO: -#if defined(__i386__) -#if defined(COMPAT_10) || defined(COMPAT_11) || defined(COMPAT_FREEBSD) +#if defined(__i386__) && (defined(COMPAT_11) || defined(COMPAT_FREEBSD)) if (kauth_authorize_machdep(l->l_cred, KAUTH_MACHDEP_X86, KAUTH_REQ_MACHDEP_X86_IOPL, NULL, NULL, NULL) != 0) return (EPERM); -#endif #endif /* FALLTHRU */ case KDDISABIO: -#if defined(__i386__) -#if defined(COMPAT_10) || defined(COMPAT_11) || defined(COMPAT_FREEBSD) +#if defined(__i386__) && (defined(COMPAT_11) || defined(COMPAT_FREEBSD)) { /* XXX NJWLWP */ struct trapframe *fp = (struct trapframe *)curlwp->l_md.md_regs; @@ -424,7 +421,6 @@ wsdisplay_usl_ioctl2(struct wsdisplay_softc *sc, struct wsscreen *scr, else fp->tf_eflags &= ~PSL_IOPL; } -#endif #endif return (0); case KDSETRAD: -- cgit