Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Simplify comparison of two processes
details: https://anonhg.NetBSD.org/src/rev/6aad53141371
branches: trunk
changeset: 319458:6aad53141371
user: kamil <kamil%NetBSD.org@localhost>
date: Wed May 30 23:54:03 2018 +0000
description:
Simplify comparison of two processes
No need to check p_pid to compare whether two processes are the same.
No functional change intended.
Sponsored by <The NetBSD Foundation>
diffstat:
sys/kern/sys_ptrace_common.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r c58fae901aaf -r 6aad53141371 sys/kern/sys_ptrace_common.c
--- a/sys/kern/sys_ptrace_common.c Wed May 30 23:41:44 2018 +0000
+++ b/sys/kern/sys_ptrace_common.c Wed May 30 23:54:03 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_ptrace_common.c,v 1.43 2018/05/29 23:34:18 kamil Exp $ */
+/* $NetBSD: sys_ptrace_common.c,v 1.44 2018/05/30 23:54:03 kamil Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.43 2018/05/29 23:34:18 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.44 2018/05/30 23:54:03 kamil Exp $");
#ifdef _KERNEL_OPT
#include "opt_ptrace.h"
@@ -403,7 +403,7 @@
* You can't attach to a process if:
* (1) it's the process that's doing the attaching,
*/
- if (t->p_pid == p->p_pid)
+ if (t == p)
return EINVAL;
/*
Home |
Main Index |
Thread Index |
Old Index