Commit 14efd56f authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Reduce buffer size in format_thousand.

parent a94856c4
...@@ -298,10 +298,10 @@ format_eui64(const unsigned char *eui) ...@@ -298,10 +298,10 @@ format_eui64(const unsigned char *eui)
const char * const char *
format_thousands(unsigned int value) format_thousands(unsigned int value)
{ {
static char buf[4][30]; static char buf[4][15];
static int i = 0; static int i = 0;
i = (i + 1) % 4; i = (i + 1) % 4;
snprintf(buf[i], 30, "%d.%.3d", value / 1000, value % 1000); snprintf(buf[i], 15, "%d.%.3d", value / 1000, value % 1000);
return buf[i]; return buf[i];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment