diff options
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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); } |