Source-Changes-HG archive

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

[src/trunk]: src/sbin/ifconfig Fix the cast for the getnameinfo() call in the...



details:   https://anonhg.NetBSD.org/src/rev/102b082e490c
branches:  trunk
changeset: 573143:102b082e490c
user:      xtraeme <xtraeme%NetBSD.org@localhost>
date:      Thu Jan 20 16:16:10 2005 +0000

description:
Fix the cast for the getnameinfo() call in the status() function, which
should be "const struct" not "struct" for sockaddr.

WARNS=3

diffstat:

 sbin/ifconfig/Makefile   |  3 ++-
 sbin/ifconfig/ifconfig.c |  6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 9dce245c499c -r 102b082e490c sbin/ifconfig/Makefile
--- a/sbin/ifconfig/Makefile    Thu Jan 20 16:02:32 2005 +0000
+++ b/sbin/ifconfig/Makefile    Thu Jan 20 16:16:10 2005 +0000
@@ -1,8 +1,9 @@
-#      $NetBSD: Makefile,v 1.16 2005/01/10 02:58:59 lukem Exp $
+#      $NetBSD: Makefile,v 1.17 2005/01/20 16:16:10 xtraeme Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/5/93
 
 .include <bsd.own.mk>
 
+WARNS= 3
 PROG=  ifconfig
 MAN=   ifconfig.8
 
diff -r 9dce245c499c -r 102b082e490c sbin/ifconfig/ifconfig.c
--- a/sbin/ifconfig/ifconfig.c  Thu Jan 20 16:02:32 2005 +0000
+++ b/sbin/ifconfig/ifconfig.c  Thu Jan 20 16:16:10 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ifconfig.c,v 1.149 2004/12/20 23:04:55 dyoung Exp $    */
+/*     $NetBSD: ifconfig.c,v 1.150 2005/01/20 16:16:10 xtraeme Exp $   */
 
 /*-
  * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
 #if 0
 static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
 #else
-__RCSID("$NetBSD: ifconfig.c,v 1.149 2004/12/20 23:04:55 dyoung Exp $");
+__RCSID("$NetBSD: ifconfig.c,v 1.150 2005/01/20 16:16:10 xtraeme Exp $");
 #endif
 #endif /* not lint */
 
@@ -1943,7 +1943,7 @@
        tunnel_status();
 
        if (sdl != NULL &&
-           getnameinfo((struct sockaddr *)sdl, sdl->sdl_len,
+           getnameinfo((const struct sockaddr *)sdl, sdl->sdl_len,
                hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST) == 0 &&
            hbuf[0] != '\0')
                printf("\taddress: %s\n", hbuf);



Home | Main Index | Thread Index | Old Index