We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2764772 commit 4c32543Copy full SHA for 4c32543
1 file changed
src/logger.c
@@ -154,13 +154,11 @@ FILE * set_logfile(const char *logfile_name)
154
*/
155
static char *str_time(void)
156
{
157
- //static char buffer[16]; // the month differs depending on the language. ex)LANG=ja_JP.UTF-8
158
- static char buffer[18];
+ static char buffer[30]; /* Arbitrary length*/
159
time_t now = 0;
160
161
now = time(0);
162
- //strftime(buffer, 16, "%b %d %H:%M:%S", localtime(&now));
163
- strftime(buffer, 18, "%b %d %H:%M:%S", localtime(&now));
+ strftime(buffer, sizeof(buffer), "%b %d %H:%M:%S", localtime(&now));
164
return buffer;
165
}
166
0 commit comments