From a453eca4be0fb0fcc19f346e602295ed11dcdf22 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 19 May 2022 19:13:44 +0200 Subject: [PATCH] Minor, rename local variable for consistency Signed-off-by: Joachim Wiberg --- src/syslogd.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/syslogd.c b/src/syslogd.c index 4297fd0..986fa1c 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -821,31 +821,34 @@ static int nslookup(const char *host, const char *service, struct addrinfo **ai) static void create_inet_socket(struct peer *pe) { - struct addrinfo *res, *r; + struct addrinfo *ai, *res; int sd, err; err = nslookup(pe->pe_name, pe->pe_serv, &res); if (err) { - ERRX("%s/udp service unknown: %s", pe->pe_serv, gai_strerror(err)); + ERRX("%s/udp service unknown: %s", pe->pe_serv, + gai_strerror(err)); return; } - for (r = res; r; r = r->ai_next) { + for (ai = res; ai; ai = ai->ai_next) { if (pe->pe_socknum + 1 >= NELEMS(pe->pe_sock)) { - WARN("Only %zd IP addresses per socket supported.", NELEMS(pe->pe_sock)); + WARN("Only %zd IP addresses per socket supported.", + NELEMS(pe->pe_sock)); break; } if (SecureMode) - r->ai_flags |= AI_SECURE; + ai->ai_flags |= AI_SECURE; else - r->ai_flags &= ~AI_SECURE; + ai->ai_flags &= ~AI_SECURE; - sd = socket_create(r, inet_cb, NULL); + sd = socket_create(ai, inet_cb, NULL); if (sd < 0) continue; - logit("Created inet socket %d for %s:%s ...\n", sd, pe->pe_name, pe->pe_serv); + logit("Created inet socket %d for %s:%s ...\n", sd, + pe->pe_name, pe->pe_serv); pe->pe_sock[pe->pe_socknum++] = sd; }