o Simplify if/then clause equating ESRCH with ENOENT when hiding a process

Submitted by:	des
This commit is contained in:
Robert Watson 2000-09-01 18:41:32 +00:00
parent c0ea0959b8
commit 84a5637620
2 changed files with 4 additions and 10 deletions
sys
fs/procfs
miscfs/procfs

@ -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:

@ -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: