summaryrefslogtreecommitdiffstats
path: root/pacredir.c
diff options
context:
space:
mode:
Diffstat (limited to 'pacredir.c')
-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 */