1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* file.c (rb_file_s_stat, rb_file_s_lstat): Remove repeated type

checks.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2009-03-23 10:00:57 +00:00
parent 5cb55eca6f
commit fe3de995b6
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Mon Mar 23 18:54:57 2009 Akinori MUSHA <knu@iDaemons.org>
* file.c (rb_file_s_stat, rb_file_s_lstat): Remove repeated type
checks.
Mon Mar 23 14:57:48 2009 Narihiro Nakamura <authorNari@gmail.com>
* gc.c (init_heap): set default to heap slots length

3
file.c
View file

@ -777,7 +777,6 @@ rb_file_s_stat(VALUE klass, VALUE fname)
rb_secure(4);
FilePathValue(fname);
if (rb_stat(fname, &st) < 0) {
FilePathValue(fname);
rb_sys_fail(RSTRING_PTR(fname));
}
return stat_new(&st);
@ -834,7 +833,7 @@ rb_file_s_lstat(VALUE klass, VALUE fname)
rb_secure(2);
FilePathValue(fname);
if (lstat(StringValueCStr(fname), &st) == -1) {
if (lstat(fname, &st) == -1) {
rb_sys_fail(RSTRING_PTR(fname));
}
return stat_new(&st);