Skip to content
Snippets Groups Projects
Commit da23c9d6 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

second shot: fix extra newline for DNSSEC domains in zonestatus

Use strftime("%c") instead of asctime(), we do not want implicit '\n'.

ref #250
parent 244ef1a9
No related branches found
No related tags found
No related merge requests found
......@@ -232,8 +232,8 @@ static char *dnssec_info(const zonedata_t *zd, char *buf, size_t buf_size)
time_t diff_time = zd->dnssec_timer->tv.tv_sec;
struct tm *t = localtime(&diff_time);
int written = snprintf(buf, buf_size, "%s", asctime(t));
if (written < 0) {
size_t written = strftime(buf, buf_size, "%c", t);
if (written == 0) {
return NULL;
}
......@@ -313,7 +313,7 @@ static int remote_c_zonestatus(server_t *s, remote_cmdargs_t* a)
char buf[512] = { '\0' };
char dnssec_buf[128] = { '\0' };
int n = snprintf(buf, sizeof(buf),
"%s\ttype=%s | serial=%u | %s %s | %s %s",
"%s\ttype=%s | serial=%u | %s %s | %s %s\n",
zd->conf->name,
zd->xfr_in.has_master ? "slave" : "master",
serial,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment