git: 1ea58b413595 - main - netlink: remove redundant check.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 18 Feb 2023 17:55:00 UTC
The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=1ea58b413595310de43587c609421ede74770f11 commit 1ea58b413595310de43587c609421ede74770f11 Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2023-02-18 17:10:39 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2023-02-18 17:53:05 +0000 netlink: remove redundant check. MFC after: 2 weeks CID: 1498867 --- sys/netlink/route/iface.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index 96f21a79a369..116acd863ba9 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -779,15 +779,11 @@ get_sa_plen(const struct sockaddr *sa) switch (sa->sa_family) { #ifdef INET case AF_INET: - if (sa == NULL) - return (32); paddr = &(((const struct sockaddr_in *)sa)->sin_addr); return bitcount32(paddr->s_addr);; #endif #ifdef INET6 case AF_INET6: - if (sa == NULL) - return (128); paddr6 = &(((const struct sockaddr_in6 *)sa)->sin6_addr); return inet6_get_plen(paddr6); #endif