diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2008-12-22 12:59:16 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2008-12-22 12:59:16 +0000 |
commit | df93ae6fb9d57fc045dcad8dcbb45b186d8c7398 (patch) | |
tree | e3e92a88844bad8e41bb34d2e579b41d69efb5e4 | |
parent | 1b42777678976e557e500a935c732024e5b89f72 (diff) |
delinting: salen may be used with no prior init; ok gilles@
-rw-r--r-- | usr.sbin/smtpd/lka.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c index 9b34a508771..79a92d9156a 100644 --- a/usr.sbin/smtpd/lka.c +++ b/usr.sbin/smtpd/lka.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka.c,v 1.8 2008/12/20 00:18:03 gilles Exp $ */ +/* $OpenBSD: lka.c,v 1.9 2008/12/22 12:59:15 jacekm Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -247,7 +247,6 @@ lka_dispatch_smtp(int sig, short event, void *p) case IMSG_LKA_HOST: { struct sockaddr *sa = NULL; - socklen_t salen; char addr[NI_MAXHOST]; struct addrinfo hints, *res; int error; @@ -277,7 +276,7 @@ lka_dispatch_smtp(int sig, short event, void *p) break; } } else { - error = getnameinfo(sa, salen, addr, sizeof(addr), + error = getnameinfo(sa, sa->sa_len, addr, sizeof(addr), NULL, 0, NI_NUMERICHOST); } strlcpy(s->s_hostname, addr, MAXHOSTNAMELEN); |