diff options
author | suz <suz@FreeBSD.org> | 2005-10-19 15:52:00 +0000 |
---|---|---|
committer | suz <suz@FreeBSD.org> | 2005-10-19 15:52:00 +0000 |
commit | a74e8eb45ae7a3eaac9ab208c21ed6e22ca9df9f (patch) | |
tree | 7087e153fd26e019402d89345c83c6a18b876b5f /usr.sbin | |
parent | 267cbf8d2223ab8f08c80e5a29e02166fd62f181 (diff) | |
download | FreeBSD-src-a74e8eb45ae7a3eaac9ab208c21ed6e22ca9df9f.zip FreeBSD-src-a74e8eb45ae7a3eaac9ab208c21ed6e22ca9df9f.tar.gz |
sync with KAME in the following points:
- removed compilation warnings
- suppress a redundant error message when a default-router-list is empty
Obtained from: KAME
Reviewd by: ume, gnn
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ndp/ndp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 31ed677..1a3b16f 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -142,7 +142,6 @@ void ifinfo __P((char *, int, char **)); void rtrlist __P((void)); void plist __P((void)); void pfx_flush __P((void)); -void rtrlist __P((void)); void rtr_flush __P((void)); void harmonize_rtr __P((void)); #ifdef SIOCSDEFIFACE_IN6 /* XXX: check SIOCGDEFIFACE_IN6 as well? */ @@ -1042,6 +1041,8 @@ ifinfo(ifname, argc, argv) printf("\nRandom ID: "); rbuf = ND.randomid; break; + default: + errx(1, "impossible case for tempaddr display"); } for (j = 0; j < 8; j++) printf("%02x", rbuf[j]); @@ -1085,6 +1086,8 @@ rtrlist() err(1, "sysctl(ICMPV6CTL_ND6_DRLIST)"); /*NOTREACHED*/ } + if (l == 0) + return; buf = malloc(l); if (!buf) { err(1, "malloc"); |