From 61f6854cea03e9e170720134713a7c18165ac6df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 15 Feb 2017 11:29:00 +0100 Subject: [PATCH] Fix error messages when sending packet fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Use perror in both cases, fix copy & paste mistake, don't use extra ":". Signed-off-by: Rafał Miłecki --- dns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dns.c b/dns.c index cf9e29b..7c49236 100644 --- a/dns.c +++ b/dns.c @@ -99,7 +99,7 @@ dns_send_question(struct interface *iface, const char *question, int type, int m DBG(1, "Q <- %s %s\n", dns_type_string(type), question); if (interface_send_packet(iface, NULL, iov, ARRAY_SIZE(iov)) < 0) - perror("failed to send question :"); + perror("failed to send question"); } @@ -178,7 +178,7 @@ dns_send_answer(struct interface *iface, struct sockaddr *to, const char *answer } if (interface_send_packet(iface, to, iov, n_iov) < 0) - fprintf(stderr, "failed to send question\n"); + perror("failed to send answer"); } void -- 2.30.2