From 8986dda74a6ef4ca09655293a5b17b252279eec6 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. --- 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 c98fa88277..61fcd61424 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -748,8 +748,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) { @@ -3306,8 +3305,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 0270edb31b..5dadd55c11 100644 --- a/bin/tools/mdig.c +++ b/bin/tools/mdig.c @@ -297,8 +297,7 @@ recvresponse(void *arg) { char *hash; int pf; - printf("-\n"); - printf(" type: MESSAGE\n"); + printf("- type: MESSAGE\n"); printf(" message:\n"); if (((response->flags & DNS_MESSAGEFLAG_RD) != 0) &&