PERFORCE change 113570 for review
Jung-uk Kim
jkim at FreeBSD.org
Fri Jan 26 17:17:03 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=113570
Change 113570 by jkim at 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));
}
More information about the p4-projects
mailing list