summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-08-16 20:00:44 +0200
committerTyge Løvset <[email protected]>2023-08-16 20:00:44 +0200
commit3da201d122a47f7bf6381b23702815474d64c471 (patch)
tree2bf2be9b196d36affa6e946766556109c48dfb92 /include
parentd267c647ca726c9ae8ff89e59098204c9bacc528 (diff)
downloadSTC-modified-3da201d122a47f7bf6381b23702815474d64c471.tar.gz
STC-modified-3da201d122a47f7bf6381b23702815474d64c471.zip
Update cspan docs.
Diffstat (limited to 'include')
-rw-r--r--include/c11/fmt.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/c11/fmt.h b/include/c11/fmt.h
index df96bae3..7787bdb0 100644
--- a/include/c11/fmt.h
+++ b/include/c11/fmt.h
@@ -208,9 +208,9 @@ void fmt_close(fmt_stream* ss) {
}
const char* fmt_tm(const char *fmt, const struct tm *tp) {
- static char buf[2][64], i = 1;
- i = !i;
- strftime(buf[i], 64, fmt, tp);
+ static char buf[2][64];
+ static int i;
+ strftime(buf[(i = !i)], sizeof buf[0], fmt, tp);
return buf[i];
}