[BACK]Return to getaddrinfo.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / net

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/net/getaddrinfo.c between version 1.42.4.2 and 1.42.4.3

version 1.42.4.2, 2000/07/13 05:51:20 version 1.42.4.3, 2000/08/31 23:16:58
Line 1 
Line 1 
 /*      $NetBSD$        */  /*      $NetBSD$        */
 /*      $KAME: getaddrinfo.c,v 1.24 2000/07/09 04:19:22 itojun Exp $    */  /*      $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $    */
   
 /*  /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.   * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Line 1334  _gethtent(name, pai)
Line 1334  _gethtent(name, pai)
         const struct addrinfo *pai;          const struct addrinfo *pai;
 {  {
         char *p;          char *p;
         char *cp, *tname;          char *cp, *tname, *cname;
         struct addrinfo hints, *res0, *res;          struct addrinfo hints, *res0, *res;
         int error;          int error;
         const char *addr;          const char *addr;
Line 1355  _gethtent(name, pai)
Line 1355  _gethtent(name, pai)
         *cp++ = '\0';          *cp++ = '\0';
         addr = p;          addr = p;
         /* if this is not something we're looking for, skip it. */          /* if this is not something we're looking for, skip it. */
           cname = NULL;
         while (cp && *cp) {          while (cp && *cp) {
                 if (*cp == ' ' || *cp == '\t') {                  if (*cp == ' ' || *cp == '\t') {
                         cp++;                          cp++;
                         continue;                          continue;
                 }                  }
                   if (!cname)
                           cname = cp;
                 tname = cp;                  tname = cp;
                 if ((cp = strpbrk(cp, " \t")) != NULL)                  if ((cp = strpbrk(cp, " \t")) != NULL)
                         *cp++ = '\0';                          *cp++ = '\0';
Line 1379  found:
Line 1382  found:
                 res->ai_flags = pai->ai_flags;                  res->ai_flags = pai->ai_flags;
   
                 if (pai->ai_flags & AI_CANONNAME) {                  if (pai->ai_flags & AI_CANONNAME) {
                         if (get_canonname(pai, res, name) != 0) {                          if (get_canonname(pai, res, cname) != 0) {
                                 freeaddrinfo(res0);                                  freeaddrinfo(res0);
                                 goto again;                                  goto again;
                         }                          }

Legend:
Removed from v.1.42.4.2  
changed lines
  Added in v.1.42.4.3

CVSweb <webmaster@jp.NetBSD.org>