diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2021-11-16 16:24:23 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2021-11-16 16:24:23 +0000 |
commit | b40962c7657dbdf8fcd684e64c8fcb88f0dfa3b0 (patch) | |
tree | 1ea740a0b3587e913f67cab1abba78bb3e7cf74e | |
parent | 40d6b92d563301ae3bbeb6c03ff968543c5c1477 (diff) |
Use size of struct not pointer
Pointed out by florian, thanks.
No change as the sockaddr remains unused by getnameinfo() in this case.
-rw-r--r-- | sbin/resolvd/resolvd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/resolvd/resolvd.c b/sbin/resolvd/resolvd.c index 20acf094258..abe94f5705b 100644 --- a/sbin/resolvd/resolvd.c +++ b/sbin/resolvd/resolvd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: resolvd.c,v 1.24 2021/11/15 18:25:52 kn Exp $ */ +/* $OpenBSD: resolvd.c,v 1.25 2021/11/16 16:24:22 kn Exp $ */ /* * Copyright (c) 2021 Florian Obser <florian@openbsd.org> * Copyright (c) 2021 Theo de Raadt <deraadt@openbsd.org> @@ -478,13 +478,13 @@ handle_route_message(struct rt_msghdr *rtm, struct sockaddr **rti_info) switch (af) { case AF_INET: memcpy(&sin->sin_addr, src, addrsz); - ss.ss_len = sizeof(sin); + ss.ss_len = sizeof(*sin); break; case AF_INET6: memcpy(&sin6->sin6_addr, src, addrsz); if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) sin6->sin6_scope_id = rtm->rtm_index; - ss.ss_len = sizeof(sin6); + ss.ss_len = sizeof(*sin6); break; } src += addrsz; |