summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/file.c b/file.c
index dbc9ac1c2a..68b658991e 100644
--- a/file.c
+++ b/file.c
@@ -76,7 +76,7 @@ static VALUE rb_cStat;
static int
apply2files(func, vargs, arg)
- int (*func)();
+ void (*func)();
VALUE vargs;
void *arg;
{
@@ -87,8 +87,7 @@ apply2files(func, vargs, arg)
for (i=0; i<args->len; i++) {
path = args->ptr[i];
SafeStringValue(path);
- if ((*func)(RSTRING(path)->ptr, arg) < 0)
- rb_sys_fail(RSTRING(path)->ptr);
+ (*func)(RSTRING(path)->ptr, arg);
}
return args->len;
@@ -913,7 +912,7 @@ chmod_internal(path, mode)
const char *path;
int mode;
{
- if (chmod(path, mode) == -1)
+ if (chmod(path, mode) < 0)
rb_sys_fail(path);
}
@@ -963,7 +962,7 @@ lchmod_internal(path, mode)
const char *path;
int mode;
{
- if (lchmod(path, mode) == -1)
+ if (lchmod(path, mode) < 0)
rb_sys_fail(path);
}