o Simplify if/then clause equating ESRCH with ENOENT when hiding a process
Submitted by: des
This commit is contained in:
parent
c0ea0959b8
commit
84a5637620
sys
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user