Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net rtsock: favour ifatoia and ifatoia6 over direct stru...



details:   https://anonhg.NetBSD.org/src/rev/20c1e5ca4871
branches:  trunk
changeset: 1007027:20c1e5ca4871
user:      roy <roy%NetBSD.org@localhost>
date:      Mon Feb 03 20:34:13 2020 +0000

description:
rtsock: favour ifatoia and ifatoia6 over direct struct casts

diffstat:

 sys/net/rtsock.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 0415a6dbf1fe -r 20c1e5ca4871 sys/net/rtsock.c
--- a/sys/net/rtsock.c  Mon Feb 03 19:37:42 2020 +0000
+++ b/sys/net/rtsock.c  Mon Feb 03 20:34:13 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtsock.c,v 1.253 2020/01/29 04:35:13 thorpej Exp $     */
+/*     $NetBSD: rtsock.c,v 1.254 2020/02/03 20:34:13 roy Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.253 2020/01/29 04:35:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.254 2020/02/03 20:34:13 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -129,11 +129,11 @@
        switch (ifa->ifa_addr->sa_family) {
 #ifdef INET
        case AF_INET:
-               return ((struct in_ifaddr *)ifa)->ia4_flags;
+               return ifatoia(ifa)->ia4_flags;
 #endif
 #ifdef INET6
        case AF_INET6:
-               return ((struct in6_ifaddr *)ifa)->ia6_flags;
+               return ifatoia6(ifa)->ia6_flags;
 #endif
        default:
                return 0;



Home | Main Index | Thread Index | Old Index