libeinfo: clean up gcc 7 compiler warnings
This commit is contained in:
parent
aa4a004c29
commit
8a945194af
@ -883,7 +883,7 @@ eindent(void)
|
||||
{
|
||||
char *env = getenv("EINFO_INDENT");
|
||||
int amount = 0;
|
||||
char num[10];
|
||||
char *num;
|
||||
|
||||
if (env) {
|
||||
errno = 0;
|
||||
@ -894,8 +894,9 @@ eindent(void)
|
||||
amount += INDENT_WIDTH;
|
||||
if (amount > INDENT_MAX)
|
||||
amount = INDENT_MAX;
|
||||
snprintf(num, 10, "%08d", amount);
|
||||
xasprintf(&num, "%08d", amount);
|
||||
setenv("EINFO_INDENT", num, 1);
|
||||
free(num);
|
||||
}
|
||||
hidden_def(eindent)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user