From: Yedaya Katsman Date: Sun, 16 Jun 2024 20:10:28 +0000 (+0300) Subject: Remove newlines from dighost errors calls X-Git-Tag: alessio/regression/026024a6ae~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dd76fe78051b926f2f7b614a40af550c6c6cdf2;p=thirdparty%2Fbind9.git Remove newlines from dighost errors calls Not all invocations had it, and this makes it more consistent with dighost_warning. Also remove the conditional newline when not outputting yaml --- diff --git a/bin/dig/dig.c b/bin/dig/dig.c index 61fcd61424c..e9665c9e015 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -3322,10 +3322,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 1e2303a1af7..001e3a46c84 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -3231,7 +3231,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(); } @@ -3423,10 +3423,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) { @@ -3650,7 +3650,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(); } @@ -4103,7 +4103,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;