Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/net avoid non-portable casts



details:   https://anonhg.NetBSD.org/src/rev/dfdba12d8370
branches:  trunk
changeset: 494387:dfdba12d8370
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jul 06 02:54:55 2000 +0000

description:
avoid non-portable casts

diffstat:

 lib/libc/net/if_indextoname.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 145e20086f19 -r dfdba12d8370 lib/libc/net/if_indextoname.c
--- a/lib/libc/net/if_indextoname.c     Thu Jul 06 02:54:12 2000 +0000
+++ b/lib/libc/net/if_indextoname.c     Thu Jul 06 02:54:55 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_indextoname.c,v 1.2 2000/04/24 10:40:25 itojun Exp $        */
+/*     $NetBSD: if_indextoname.c,v 1.3 2000/07/06 02:54:55 christos Exp $      */
 /*     $KAME: if_indextoname.c,v 1.4 2000/04/24 10:08:41 itojun Exp $  */
 
 /*-
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: if_indextoname.c,v 1.2 2000/04/24 10:40:25 itojun Exp $");
+__RCSID("$NetBSD: if_indextoname.c,v 1.3 2000/07/06 02:54:55 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -75,7 +75,8 @@
        for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) {
                if (ifa->ifa_addr &&
                    ifa->ifa_addr->sa_family == AF_LINK &&
-                   ifindex == ((struct sockaddr_dl*)ifa->ifa_addr)->sdl_index)
+                   ifindex == ((struct sockaddr_dl*)
+                       (void *)ifa->ifa_addr)->sdl_index)
                        break;
        }
 



Home | Main Index | Thread Index | Old Index