summaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'status.c')
-rw-r--r--status.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/status.c b/status.c
index 2349547..e5e6149 100644
--- a/status.c
+++ b/status.c
@@ -97,10 +97,9 @@ struct interface_status interfaces[8];
void
date(char* buf) {
time_t now = time(NULL);
- struct tm tm;
- tm = *localtime(&now);
+ struct tm *tm = localtime(&now);
- strftime(buf, ELEMENT_STRBUF_SZ, "%Y-%m-%d %H:%M", &tm);
+ strftime(buf, ELEMENT_STRBUF_SZ, "%Y-%m-%d %H:%M", tm);
}
struct battery_status