Date: Fri, 26 Jan 2007 17:17:03 GMT From: Jung-uk Kim <jkim@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 113570 for review Message-ID: <200701261717.l0QHH38J094983@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=113570 Change 113570 by jkim@jkim_hammer on 2007/01/26 17:16:57 Micro optimize and unconfuse. Pointed out by: netchild Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#30 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#24 edit Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#30 (text+ko) ==== @@ -857,8 +857,7 @@ * Linux/ia64 does the same in i386 emulation mode. */ bsd_args.prot = linux_args->prot; - if ((bsd_args.prot & PROT_WRITE) || - (bsd_args.prot & (PROT_READ | PROT_EXEC))) + if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; if (linux_args->fd != -1) { @@ -979,8 +978,7 @@ bsd_args.addr = uap->addr; bsd_args.len = uap->len; bsd_args.prot = uap->prot; - if ((bsd_args.prot & PROT_WRITE) || - (bsd_args.prot & (PROT_READ | PROT_EXEC))) + if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; return (mprotect(td, &bsd_args)); } ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#24 (text+ko) ==== @@ -658,8 +658,7 @@ * Linux/ia64 does the same in i386 emulation mode. */ bsd_args.prot = linux_args->prot; - if ((bsd_args.prot & PROT_WRITE) || - (bsd_args.prot & (PROT_READ | PROT_EXEC))) + if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; if (linux_args->fd != -1) { @@ -780,8 +779,7 @@ bsd_args.addr = uap->addr; bsd_args.len = uap->len; bsd_args.prot = uap->prot; - if ((bsd_args.prot & PROT_WRITE) || - (bsd_args.prot & (PROT_READ | PROT_EXEC))) + if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; return (mprotect(td, &bsd_args)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701261717.l0QHH38J094983>