aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2016-10-11 10:10:39 +0200
committerGravatar Christian Hesse <mail@eworm.de>2016-10-11 10:10:39 +0200
commit37bc50d90551a2580f7762d8527e76663fddab20 (patch)
tree9f3ba5dd818060980703aaf66e9451fb5612153e
parentc7e27fc0a6fc4201b52be033083446813dfc2ec7 (diff)
downloadpaccache-37bc50d90551a2580f7762d8527e76663fddab20.tar.gz
paccache-37bc50d90551a2580f7762d8527e76663fddab20.tar.zst
add comment about ctime stuff
-rw-r--r--pacredir.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/pacredir.c b/pacredir.c
index 2dabcb7..0241586 100644
--- a/pacredir.c
+++ b/pacredir.c
@@ -422,13 +422,16 @@ static int ahc_echo(void * cls,
request = requests[i];
+ /* write the time to buffer ctime, then strip the line break */
ctime_r(&request->last_modified, ctime);
- ctime[strlen(ctime) - 1] = 0;
+ ctime[strlen(ctime) - 1] = '\0';
if (request->http_code == MHD_HTTP_OK)
- write_log(stdout, "Found: %s (%f sec, modified: %s)\n", request->url, request->time_total, ctime);
+ write_log(stdout, "Found: %s (%f sec, modified: %s)\n",
+ request->url, request->time_total, ctime);
else if (verbose > 0 && request->http_code > 0)
- write_log(stderr, "Received HTTP status code %d for %s\n", request->http_code, request->url);
+ write_log(stderr, "Received HTTP status code %d for %s\n",
+ request->http_code, request->url);
if (request->http_code == MHD_HTTP_OK &&
/* for db files choose the most recent server */