Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/e920313b2864
branches:  trunk
changeset: 494389:e920313b2864
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jul 06 02:56:25 2000 +0000

description:
elide non-portable casts

diffstat:

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

diffs (28 lines):

diff -r f21f0d61a889 -r e920313b2864 lib/libc/net/if_nametoindex.c
--- a/lib/libc/net/if_nametoindex.c     Thu Jul 06 02:55:45 2000 +0000
+++ b/lib/libc/net/if_nametoindex.c     Thu Jul 06 02:56:25 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_nametoindex.c,v 1.2 2000/04/24 10:40:25 itojun Exp $        */
+/*     $NetBSD: if_nametoindex.c,v 1.3 2000/07/06 02:56:25 christos Exp $      */
 /*     $KAME: if_nametoindex.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_nametoindex.c,v 1.2 2000/04/24 10:40:25 itojun Exp $");
+__RCSID("$NetBSD: if_nametoindex.c,v 1.3 2000/07/06 02:56:25 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -74,7 +74,8 @@
                if (ifa->ifa_addr &&
                    ifa->ifa_addr->sa_family == AF_LINK &&
                    strcmp(ifa->ifa_name, ifname) == 0) {
-                       ni = ((struct sockaddr_dl*)ifa->ifa_addr)->sdl_index;
+                       ni = ((struct sockaddr_dl*)
+                           (void *)ifa->ifa_addr)->sdl_index;
                        break;
                }
        }



Home | Main Index | Thread Index | Old Index