diff --git a/bin/dig/dig.c b/bin/dig/dig.c index 74900f4c29..04b3a9ba98 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -717,8 +717,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg, char *hash; int pf; - printf("-\n"); - printf(" type: MESSAGE\n"); + printf("- type: MESSAGE\n"); printf(" message:\n"); if (isquery) { @@ -2965,8 +2964,7 @@ dig_error(const char *format, ...) { va_list args; if (yaml) { - printf("-\n"); - printf(" type: DIG_ERROR\n"); + printf("- type: DIG_ERROR\n"); /* * Print an indent before a literal block quote. @@ -2983,10 +2981,7 @@ dig_error(const char *format, ...) { va_start(args, format); vprintf(format, args); va_end(args); - - if (!yaml) { - printf("\n"); - } + printf("\n"); /* We get the error without a newline */ } static void diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 9e500de77f..b5e27931e5 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -3249,7 +3249,7 @@ udp_ready(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) { start_udp(next); check_if_done(); } else { - dighost_error("no servers could be reached\n"); + dighost_error("no servers could be reached"); clear_current_lookup(); } @@ -3432,10 +3432,10 @@ force_next(dig_query_t *query) { isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr); isc_netaddr_format(&netaddr, buf, sizeof(buf)); - dighost_error("no response from %s\n", buf); + dighost_error("no response from %s", buf); } else { printf("%s", l->cmdline); - dighost_error("no servers could be reached\n"); + dighost_error("no servers could be reached"); } if (exitcode < 9) { @@ -3655,7 +3655,7 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) { start_tcp(next); check_if_done(); } else { - dighost_error("no servers could be reached\n"); + dighost_error("no servers could be reached"); clear_current_lookup(); } @@ -4109,7 +4109,7 @@ recv_done(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region, * and cancel the lookup. */ printf("%s", l->cmdline); - dighost_error("no servers could be reached\n"); + dighost_error("no servers could be reached"); if (exitcode < 9) { exitcode = 9; diff --git a/bin/tools/mdig.c b/bin/tools/mdig.c index d935524b6c..f84f1daed0 100644 --- a/bin/tools/mdig.c +++ b/bin/tools/mdig.c @@ -297,8 +297,7 @@ recvresponse(isc_task_t *task, isc_event_t *event) { char *hash; int pf; - printf("-\n"); - printf(" type: MESSAGE\n"); + printf("- type: MESSAGE\n"); printf(" message:\n"); if (((response->flags & DNS_MESSAGEFLAG_RD) != 0) &&