diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2022-01-20 14:18:11 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2022-01-20 14:18:11 +0000 |
commit | 8df65ba119d763e239ed7ff46de87e8bd9321fa5 (patch) | |
tree | d66a2e30445e674036146e04ef3b63103b12c3ae /usr.sbin/smtpd | |
parent | b344443d2bcbd5741f2ba9deaa323f07b3471215 (diff) |
remove unused variable from all copies of _asr_strdname()
... including those inlined into print_dname(). This also fixes
-Wunused-but-set-variable warnings warnings in smtpd and smtpctl.
The code was imported with asr and then copied around.
ok deraadt@ guenther@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/unpack_dns.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/unpack_dns.c b/usr.sbin/smtpd/unpack_dns.c index fd7ec6ba6e0..2cde633cd98 100644 --- a/usr.sbin/smtpd/unpack_dns.c +++ b/usr.sbin/smtpd/unpack_dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unpack_dns.c,v 1.2 2021/06/14 17:58:16 eric Exp $ */ +/* $OpenBSD: unpack_dns.c,v 1.3 2022/01/20 14:18:10 naddy Exp $ */ /* * Copyright (c) 2011-2014 Eric Faurot <eric@faurot.net> @@ -195,7 +195,7 @@ print_dname(const char *_dname, char *buf, size_t max) { const unsigned char *dname = _dname; char *res; - size_t left, n, count; + size_t left, count; if (_dname[0] == 0) { (void)strlcpy(buf, ".", max); @@ -204,7 +204,7 @@ print_dname(const char *_dname, char *buf, size_t max) res = buf; left = max - 1; - for (n = 0; dname[0] && left; n += dname[0]) { + while (dname[0] && left) { count = (dname[0] < (left - 1)) ? dname[0] : (left - 1); memmove(buf, dname + 1, count); dname += dname[0] + 1; |