summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-04-25 18:25:06 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2013-04-25 18:25:06 +0900
commitfa0e41a84d472de9e37ae8ad609e94a1ab905c53 (patch)
treefa3d4e4c0699456a0950f422069a4c911db666f0 /src
parent0aecb8a2bbe2595bc6261f1d08c256becfc53482 (diff)
downloadmruby-fa0e41a84d472de9e37ae8ad609e94a1ab905c53.tar.gz
mruby-fa0e41a84d472de9e37ae8ad609e94a1ab905c53.zip
remove unnecessary local variable
Diffstat (limited to 'src')
-rw-r--r--src/string.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/string.c b/src/string.c
index 7ea6844a1..371d3faf6 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2348,12 +2348,10 @@ mrb_str_dump(mrb_state *mrb, mrb_value str)
*q++ = c;
}
else {
- int oct = c & 0xff;
-
*q++ = '\\';
- q[2] = '0' + oct % 8; oct /= 8;
- q[1] = '0' + oct % 8; oct /= 8;
- q[0] = '0' + oct % 8;
+ q[2] = '0' + c % 8; c /= 8;
+ q[1] = '0' + c % 8; c /= 8;
+ q[0] = '0' + c % 8;
q += 3;
}
}