From 87cb888a2d8285fedeef8a9a6e83c99585c397c7 Mon Sep 17 00:00:00 2001 From: Yedaya Katsman Date: Sun, 16 Jun 2024 23:09:53 +0300 Subject: [PATCH] Remove extra newline from +yaml output The newlines weren't needed for the yaml syntax, and took up space. (cherry picked from commit 8986dda74a6ef4ca09655293a5b17b252279eec6) --- bin/dig/dig.c | 6 ++---- bin/tools/mdig.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/dig/dig.c b/bin/dig/dig.c index 74900f4c29..33997efa1e 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. 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) &&