Simplify a debug code function.
* src/debug.c (_gpgme_debug): Remove static space string.
This commit is contained in:
parent
de30df9ce3
commit
a7e5f1096f
13
src/debug.c
13
src/debug.c
@ -258,17 +258,10 @@ _gpgme_debug (int level, const char *format, ...)
|
|||||||
}
|
}
|
||||||
#ifdef FRAME_NR
|
#ifdef FRAME_NR
|
||||||
{
|
{
|
||||||
char spaces[] = " ";
|
int indent;
|
||||||
int nr_spaces = sizeof (spaces) - 1;
|
|
||||||
int nr_columns;
|
|
||||||
|
|
||||||
nr_columns = 2 * (frame_nr - 1);
|
indent = frame_nr > 0? (2 * (frame_nr - 1)):0;
|
||||||
if (nr_columns > nr_spaces)
|
fprintf (errfp, "%*s", indent < 40? indent : 40, "");
|
||||||
nr_columns = nr_spaces;
|
|
||||||
if (nr_columns < 0)
|
|
||||||
nr_columns = 0;
|
|
||||||
spaces[nr_columns] = '\0';
|
|
||||||
fprintf (errfp, "%s", spaces);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user