summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authormichal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-21 15:47:54 +0000
committermichal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-21 15:47:54 +0000
commitffc13a6525c7c72cbb858380e6870106bf5a7dfa (patch)
tree3b51176716a877c59eebbe6e82533d2cae3d7bc5 /process.c
parent022d1f123c6149915970b4cac9664f66d8d5875c (diff)
*.c: Int vs Long cleanup
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/process.c b/process.c
index b4f462b..7385ec9 100644
--- a/process.c
+++ b/process.c
@@ -1033,9 +1033,8 @@ proc_getpgid(obj, pid)
VALUE obj, pid;
{
#if defined(HAVE_GETPGID) && !defined(__CHECKER__)
- int i;
+ int i = getpgid(NUM2INT(pid));
- i = getpgid(NUM2INT(pid));
if (i < 0) rb_sys_fail(0);
return INT2NUM(i);
#else
@@ -1148,9 +1147,8 @@ static VALUE
proc_setuid(obj, id)
VALUE obj, id;
{
- int uid;
+ int uid = NUM2INT(id);
- uid = NUM2INT(id);
#if defined(HAVE_SETRESUID) && !defined(__CHECKER__)
if (setresuid(uid, -1, -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETREUID
@@ -1182,9 +1180,8 @@ static VALUE
proc_setgid(obj, id)
VALUE obj, id;
{
- int gid;
+ int gid = NUM2INT(id);
- gid = NUM2INT(id);
#if defined(HAVE_SETRESGID) && !defined(__CHECKER__)
if (setresgid(gid, -1, -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETREGID
@@ -1239,6 +1236,7 @@ proc_getegid(obj)
VALUE obj;
{
int egid = getegid();
+
return INT2FIX(egid);
}