aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-18 04:35:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-18 04:35:25 +0000
commit051aa17e05b038c83fb369155635eedfe1034873 (patch)
tree173c7711b791dbd6cca60d7448094e968d8e8f88 /file.c
parent9ec0e7b2c4230a012e894e72589364d2aeb59529 (diff)
downloadruby-051aa17e05b038c83fb369155635eedfe1034873.tar.gz
Get rid of shadowing local variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/file.c b/file.c
index f8b424f2fc..b0e4888f7e 100644
--- a/file.c
+++ b/file.c
@@ -3946,11 +3946,11 @@ realpath_rec(long *prefixlenp, VALUE *resolvedp, const char *unresolved,
link_names = skipprefixroot(link_prefix, link_prefix + RSTRING_LEN(link), rb_enc_get(link));
link_prefixlen = link_names - link_prefix;
if (link_prefixlen > 0) {
- rb_encoding *enc, *linkenc = rb_enc_get(link);
+ rb_encoding *tmpenc, *linkenc = rb_enc_get(link);
link_orig = link;
link = rb_str_subseq(link, 0, link_prefixlen);
- enc = rb_enc_check(*resolvedp, link);
- if (enc != linkenc) link = rb_str_conv_enc(link, linkenc, enc);
+ tmpenc = rb_enc_check(*resolvedp, link);
+ if (tmpenc != linkenc) link = rb_str_conv_enc(link, linkenc, tmpenc);
*resolvedp = link;
*prefixlenp = link_prefixlen;
}