From 9c2aa0a0a35a3a7ae58f0e3654943a91f3c48189 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Mon, 20 Mar 2017 05:12:27 +0000 Subject: [PATCH] syslogd: fix dprintf in socksetup(..) - Make the explanation more complete - Correct a minor grammar nit with verb tense. - Don't emit the message if `pe->pe_name` is NULL (it doesn't have much value). MFC after: 1 week Sponsored by: Dell EMC Isilon --- usr.sbin/syslogd/syslogd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index b28b151728a2..9271ff51c2da 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2901,7 +2901,8 @@ socksetup(struct peer *pe) .ai_socktype = SOCK_DGRAM, .ai_flags = AI_PASSIVE }; - dprintf("Try %s\n", pe->pe_name); + if (pe->pe_name != NULL) + dprintf("Trying peer: %s\n", pe->pe_name); if (pe->pe_serv == NULL) pe->pe_serv = "syslog"; error = getaddrinfo(pe->pe_name, pe->pe_serv, &hints, &res0);