summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <[email protected]>2017-12-12 18:52:18 +0900
committerYasuhiro Matsumoto <[email protected]>2017-12-12 18:52:41 +0900
commit17cd7a65e7e91e4397dbbf0de0d77f78990aa6a2 (patch)
treea204cd242472d87d821b2de4d073de3ce1e51efb /mrbgems/mruby-io
parentbceb6640fa4992fc51567fb431cc60dbf1f864f8 (diff)
downloadmruby-17cd7a65e7e91e4397dbbf0de0d77f78990aa6a2.tar.gz
mruby-17cd7a65e7e91e4397dbbf0de0d77f78990aa6a2.zip
fix wrong variable name
Diffstat (limited to 'mrbgems/mruby-io')
-rw-r--r--mrbgems/mruby-io/src/io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-io/src/io.c b/mrbgems/mruby-io/src/io.c
index c015018c9..99ddf4e39 100644
--- a/mrbgems/mruby-io/src/io.c
+++ b/mrbgems/mruby-io/src/io.c
@@ -557,7 +557,7 @@ mrb_cloexec_open(mrb_state *mrb, const char *pathname, mrb_int flags, mrb_int mo
{
mrb_value emsg;
int fd, retry = FALSE;
- char* utf8 = mrb_locale_from_utf8(pathname, -1);
+ char* fname = mrb_locale_from_utf8(pathname, -1);
#ifdef O_CLOEXEC
/* O_CLOEXEC is available since Linux 2.6.23. Linux 2.6.18 silently ignore it. */
@@ -566,7 +566,7 @@ mrb_cloexec_open(mrb_state *mrb, const char *pathname, mrb_int flags, mrb_int mo
flags |= O_NOINHERIT;
#endif
reopen:
- fd = open(utf8, (int)flags, mode);
+ fd = open(fname, (int)flags, mode);
if (fd == -1) {
if (!retry) {
switch (errno) {
@@ -582,7 +582,7 @@ reopen:
mrb_str_modify(mrb, mrb_str_ptr(emsg));
mrb_sys_fail(mrb, RSTRING_PTR(emsg));
}
- mrb_utf8_free(utf8);
+ mrb_utf8_free(fname);
if (fd <= 2) {
mrb_fd_cloexec(mrb, fd);