We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fdb883 commit 8bc9158Copy full SHA for 8bc9158
src/libeinfo/libeinfo.c
@@ -459,7 +459,6 @@ _eindent(FILE * EINFO_RESTRICT stream)
459
{
460
char *env = getenv("EINFO_INDENT");
461
int amount = 0;
462
- char indent[INDENT_MAX];
463
464
if (env) {
465
errno = 0;
@@ -468,14 +467,9 @@ _eindent(FILE * EINFO_RESTRICT stream)
468
467
amount = 0;
469
else if (amount > INDENT_MAX)
470
amount = INDENT_MAX;
471
-
472
- if (amount > 0)
473
- memset(indent, ' ', (size_t)amount);
474
}
475
476
- /* Terminate it */
477
- memset(indent + amount, 0, 1);
478
- return fprintf(stream, "%s", indent);
+ return fprintf(stream, "%*s", amount, "");
479
480
481
static const char *
0 commit comments