]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove extra newline from +yaml output
authorYedaya Katsman <yedaya.ka@gmail.com>
Sun, 16 Jun 2024 20:09:53 +0000 (23:09 +0300)
committerMark Andrews <marka@isc.org>
Mon, 5 Aug 2024 03:40:41 +0000 (03:40 +0000)
The newlines weren't needed for the yaml syntax, and took up space.

(cherry picked from commit 8986dda74a6ef4ca09655293a5b17b252279eec6)

bin/dig/dig.c
bin/tools/mdig.c

index 74900f4c29f666f9b9fbf6591e6853128f395877..33997efa1eab91cf865875dc7a0e1e6d4b61b440 100644 (file)
@@ -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.
index d935524b6c06cbd0b67db993e447c349871fe6d0..f84f1daed011cc296c0468284ea601a75ac206de 100644 (file)
@@ -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) &&