[hackers] [slstatus] datetime: Add error message || Aaron Marcher
commit 932f65c37388220298b44c65e601c593e4e40b9e
Author: Aaron Marcher <me_AT_drkhsh.at>
AuthorDate: Sun May 6 22:38:29 2018 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Sun May 6 22:38:29 2018 +0200
datetime: Add error message
diff --git a/components/datetime.c b/components/datetime.c
index 713b0fb..6dc9678 100644
--- a/components/datetime.c
+++ b/components/datetime.c
_AT_@ -10,6 +10,7 @@ datetime(const char *fmt)
t = time(NULL);
if (!strftime(buf, sizeof(buf), fmt, localtime(&t))) {
+ fprintf(stderr, "strftime: Result string exceeds buffer size\n");
return NULL;
}
Received on Sun May 06 2018 - 22:40:28 CEST
This archive was generated by hypermail 2.3.0
: Sun May 06 2018 - 22:48:23 CEST