]> git.scottworley.com Git - tl-append/blobdiff - common.c
Fix memory leak
[tl-append] / common.c
index 1bc1102c001aa023d4eea1e9ebc0dda0ff516d05..88e7b73d0e5d893104c76edf108526d0f79f88de 100644 (file)
--- a/common.c
+++ b/common.c
@@ -4,7 +4,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-const char *FILENAME = "tl.log";
+const char *const FILENAME = "tl.log";
 
 void die(const char *message) {
   fputs(message, stderr);
@@ -17,7 +17,7 @@ void die_err(const char *message) {
   exit(1);
 }
 
-const char *encode_time(time_t t) {
+char *encode_time(time_t t) {
   struct tm tm;
   localtime_r(&t, &tm);
   const size_t size = 20;