aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/debug.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/debug.c b/src/debug.c
index 56effa75..ca0bb21a 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -258,17 +258,10 @@ _gpgme_debug (int level, const char *format, ...)
}
#ifdef FRAME_NR
{
- char spaces[] = " ";
- int nr_spaces = sizeof (spaces) - 1;
- int nr_columns;
-
- nr_columns = 2 * (frame_nr - 1);
- if (nr_columns > nr_spaces)
- nr_columns = nr_spaces;
- if (nr_columns < 0)
- nr_columns = 0;
- spaces[nr_columns] = '\0';
- fprintf (errfp, "%s", spaces);
+ int indent;
+
+ indent = frame_nr > 0? (2 * (frame_nr - 1)):0;
+ fprintf (errfp, "%*s", indent < 40? indent : 40, "");
}
#endif