Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/net fix comment.



details:   https://anonhg.NetBSD.org/src/rev/4f84330c597c
branches:  trunk
changeset: 481171:4f84330c597c
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Jan 24 03:08:12 2000 +0000

description:
fix comment.
better sync with kame tree.

diffstat:

 lib/libc/net/getaddrinfo.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 5a096a7b4eea -r 4f84330c597c lib/libc/net/getaddrinfo.c
--- a/lib/libc/net/getaddrinfo.c        Mon Jan 24 03:01:54 2000 +0000
+++ b/lib/libc/net/getaddrinfo.c        Mon Jan 24 03:08:12 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getaddrinfo.c,v 1.22 2000/01/23 04:03:21 itojun Exp $  */
+/*     $NetBSD: getaddrinfo.c,v 1.23 2000/01/24 03:08:12 itojun Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -346,8 +346,7 @@
         */
        if (MATCH_FAMILY(pai->ai_family, PF_INET, 1)
         || MATCH_FAMILY(pai->ai_family, PF_INET6, 1)) {
-               /* call to get_portmatch() can conterminate *pai */
-               ai0 = *pai;
+               ai0 = *pai;     /* backup *pai */
 
                if (pai->ai_family == PF_UNSPEC)
                        pai->ai_family = PF_INET6;
@@ -987,8 +986,13 @@
 
        if (servname == NULL)
                return 0;
-       if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
+       switch (ai->ai_family) {
+       case AF_INET:
+       case AF_INET6:
+               break;
+       default:
                return 0;
+       }
 
        switch (ai->ai_socktype) {
        case SOCK_RAW:



Home | Main Index | Thread Index | Old Index