diff options
author | kib <kib@FreeBSD.org> | 2015-10-20 20:12:42 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-10-20 20:12:42 +0000 |
commit | f8f03021517d1601d80a92e9ddcc7c0103f9d912 (patch) | |
tree | 76cacab65efc597ebe479b098b101a100a42f4de /sys | |
parent | fff41eb460e1fb0d65ac2f413911ce6460ca8127 (diff) | |
download | FreeBSD-src-f8f03021517d1601d80a92e9ddcc7c0103f9d912.zip FreeBSD-src-f8f03021517d1601d80a92e9ddcc7c0103f9d912.tar.gz |
No need to dereference struct proc to pids when comparing processes
for equality.
Reviewed by: jhb, pho
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/sys_process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 8392c83..588b43c 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -749,7 +749,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; } |