Xinqi Bao's Git
projects
/
slstatus.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
| inline |
side by side
(parent:
ee5ec75
)
datetime: Add error message
author
Aaron Marcher <
[email protected]
>
Sun, 6 May 2018 20:38:29 +0000
(22:38 +0200)
committer
Aaron Marcher <
[email protected]
>
Sun, 6 May 2018 20:38:29 +0000
(22:38 +0200)
components/datetime.c
diff
|
blob
|
history
diff --git
a/components/datetime.c
b/components/datetime.c
index
713b0fb
..
6dc9678
100644
(file)
--- a/
components/datetime.c
+++ b/
components/datetime.c
@@
-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;
}