summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-11-03 08:28:47 +0000
committerkib <kib@FreeBSD.org>2015-11-03 08:28:47 +0000
commit5e283417b20f49343d939a29a2343b558c6c4221 (patch)
tree49693b81624304988ba01e92327d20c91837e627 /sys/kern
parent2f6ac8211dcc70783339852db2060c774b5a4923 (diff)
downloadFreeBSD-src-5e283417b20f49343d939a29a2343b558c6c4221.zip
FreeBSD-src-5e283417b20f49343d939a29a2343b558c6c4221.tar.gz
MFC r289658:
No need to dereference struct proc to pids when comparing processes for equality.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sys_process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index 15adf9a..a3a861f 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -748,7 +748,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data)
case PT_ATTACH:
/* Self */
- if (p->p_pid == td->td_proc->p_pid) {
+ if (p == td->td_proc) {
error = EINVAL;
goto fail;
}
OpenPOWER on IntegriCloud