aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-07 03:03:19 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-07-07 03:03:19 +0000
commit2520f3f79c0b65894cea4914c041f06b8d29b41a (patch)
treeb7267f00b5a25c931572ae65de4ac3ef2606cb43
parent01e1a0ac78217f912115df046f5ae07dc146176f (diff)
downloadruby-2520f3f79c0b65894cea4914c041f06b8d29b41a.tar.gz
* file.c (ruby_find_basename): should initialize f.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--file.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f8ac4d0389..9492355913 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Jul 7 12:00:24 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * file.c (ruby_find_basename): should initialize f.
+
Wed Jul 7 11:44:01 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/zlib/zlib.c (gzfile_raise): add invalid header to
diff --git a/file.c b/file.c
index 46cf319ff7..63a6ebe61f 100644
--- a/file.c
+++ b/file.c
@@ -3436,7 +3436,7 @@ ruby_find_basename(const char *name, long *len, long *ext)
#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
const char *root;
#endif
- long f, n = -1;
+ long f = 0, n = -1;
name = skipprefix(name);
#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC