summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2021-08-10 22:57:04 +0200
committerLeah Neukirchen <leah@vuxu.org>2021-08-10 22:57:04 +0200
commite19bb2ea3ece45dc6c9a6d8d71f4083e9063b5fc (patch)
tree92e68928cdb9620f5a03fc5f3d19414453045054
parent9bc97215c6df6c90cea1ff3a7e8fa42731c4bdfa (diff)
downloadhittpd-e19bb2ea3ece45dc6c9a6d8d71f4083e9063b5fc.tar.gz
hittpd-e19bb2ea3ece45dc6c9a6d8d71f4083e9063b5fc.tar.xz
hittpd-e19bb2ea3ece45dc6c9a6d8d71f4083e9063b5fc.zip
clean up, don't shadow timestamp
-rw-r--r--hittpd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hittpd.c b/hittpd.c
index c08b129..fef83d8 100644
--- a/hittpd.c
+++ b/hittpd.c
@@ -685,14 +685,14 @@ on_message_complete(http_parser *p) {
 			int len = strlen(file) + !!S_ISDIR(ist.st_mode);
 			fprintf(stream, "%-*.*s ", 48 - len, 48 - len, "");
 
-			char timestamp[64];
-			strftime(timestamp, sizeof timestamp,
+			char filetimestamp[64];
+			strftime(filetimestamp, sizeof filetimestamp,
 			    "%Y-%m-%d %H:%M", localtime(&ist.st_mtime));
 
 			if (S_ISDIR(ist.st_mode))
-				fprintf(stream, " %s %12s\n", timestamp, "-");
+				fprintf(stream, " %s %12s\n", filetimestamp, "-");
 			else
-				fprintf(stream, " %s %12jd\n", timestamp,
+				fprintf(stream, " %s %12jd\n", filetimestamp,
 				    (intmax_t)ist.st_size);
 
 		}