diff options
author | rwatson <rwatson@FreeBSD.org> | 2000-09-01 18:41:32 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2000-09-01 18:41:32 +0000 |
commit | e95936f6ddf2411361330abe8f44903c01b42fe5 (patch) | |
tree | 1d90199c45d17a3e4ddfe9279405f2422e773201 /sys/miscfs | |
parent | 997c80bdd827328f71fb9e7c1f5d96ad61ef4120 (diff) | |
download | FreeBSD-src-e95936f6ddf2411361330abe8f44903c01b42fe5.zip FreeBSD-src-e95936f6ddf2411361330abe8f44903c01b42fe5.tar.gz |
o Simplify if/then clause equating ESRCH with ENOENT when hiding a process
Submitted by: des
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index 0619a68..e952318 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -239,11 +239,8 @@ procfs_ioctl(ap) return ENOTTY; } - if ((error = p_can(p, procp, P_CAN_DEBUG, NULL))) { - if (error == ESRCH) - error = ENOENT; - return (error); - } + if ((error = p_can(p, procp, P_CAN_DEBUG, NULL))) + return (error == ESRCH ? ENOENT : error); switch (ap->a_command) { case PIOCBIS: |