aboutsummaryrefslogtreecommitdiff
path: root/ctl.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-09-17 22:34:52 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-09-17 22:34:52 +0200
commit56509ab16c8d2225182eb0400e5c6a4900870391 (patch)
treee3c3bcc760ecc187a3f4ee8c6616855d15e86d83 /ctl.c
parent3e400c3df5572524b7ba08b030f45eb3ba6b7734 (diff)
downloadcforum-56509ab16c8d2225182eb0400e5c6a4900870391.tar.gz
Fix mktpl bug
Diffstat (limited to 'ctl.c')
-rw-r--r--ctl.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/ctl.c b/ctl.c
index c5f90f4..773e4f6 100644
--- a/ctl.c
+++ b/ctl.c
@@ -6,21 +6,16 @@
#include "query.h"
#include "site.h"
-#define PFREE(s) do{ printf("%s", s); free(s); }while(0)
-
-char *
-date(int timestamp)
+void
+printdate(int timestamp)
{
- char *buf;
+ char buf[20];
struct tm *t;
- if(!(buf = malloc(20)))
- err(1, "malloc");
-
t = localtime((time_t *)&timestamp);
strftime(buf, 20, "%Y-%m-%d %H:%M", t);
- return buf;
+ printf(buf);
}
void