summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-23 19:03:32 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-23 19:03:32 (GMT)
commitf468e000ce3ed8c5158af06600a0724bf9619c4b (patch)
treeebfa2b0e0e8894e54ed0784164dcf6211807f13b /debug.c
parentfe80dd73b9a5021e2e2cfe61cda87512f8ee4c53 (diff)
* debug.c (ruby_debug_print_indent): use length in fprintf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/debug.c b/debug.c
index b819b06..7ca9e3a 100644
--- a/debug.c
+++ b/debug.c
@@ -70,10 +70,7 @@ void
ruby_debug_print_indent(int level, int debug_level, int indent_level)
{
if (level < debug_level) {
- int i;
- for (i = 0; i < indent_level; i++) {
- fprintf(stderr, " ");
- }
+ fprintf(stderr, "%*s", indent_level, "");
fflush(stderr);
}
}