summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorS.H <gamelinks007@gmail.com>2021-11-09 17:09:29 +0900
committerGitHub <noreply@github.com>2021-11-09 17:09:29 +0900
commit75aae66c4f3eacd527cea71e0c8e486b630fc0a4 (patch)
tree8aee73fc1b63d6bdfa4761852fd7da8bcac416e1 /process.c
parentc1c13c58eebb7441d27536a32d73380d165d6eda (diff)
downloadruby-75aae66c4f3eacd527cea71e0c8e486b630fc0a4.tar.gz
Some codes replace to `RBOOL` macro (#5023)
* Some code replace and using RBOOL macro * Fix indent * Using RBOOL in syserr_eqq function
Diffstat (limited to 'process.c')
-rw-r--r--process.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/process.c b/process.c
index 6b83767738..818b0257d4 100644
--- a/process.c
+++ b/process.c
@@ -898,10 +898,7 @@ pst_wifstopped(VALUE st)
{
int status = PST2INT(st);
- if (WIFSTOPPED(status))
- return Qtrue;
- else
- return Qfalse;
+ return RBOOL(WIFSTOPPED(status));
}
@@ -937,10 +934,7 @@ pst_wifsignaled(VALUE st)
{
int status = PST2INT(st);
- if (WIFSIGNALED(status))
- return Qtrue;
- else
- return Qfalse;
+ return RBOOL(WIFSIGNALED(status));
}
@@ -978,10 +972,7 @@ pst_wifexited(VALUE st)
{
int status = PST2INT(st);
- if (WIFEXITED(status))
- return Qtrue;
- else
- return Qfalse;
+ return RBOOL(WIFEXITED(status));
}
@@ -1047,10 +1038,7 @@ pst_wcoredump(VALUE st)
#ifdef WCOREDUMP
int status = PST2INT(st);
- if (WCOREDUMP(status))
- return Qtrue;
- else
- return Qfalse;
+ return RBOOL(WCOREDUMP(status));
#else
return Qfalse;
#endif