(gethosts): Not necessary to create the canon string more than once.
authordrepper <drepper>
Fri, 17 Sep 2004 23:49:15 +0000 (23:49 +0000)
committerdrepper <drepper>
Fri, 17 Sep 2004 23:49:15 +0000 (23:49 +0000)
sysdeps/posix/getaddrinfo.c

index c8cb752..64eb46a 100644 (file)
@@ -343,7 +343,7 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
          pat = &((*pat)->next);                                              \
        }                                                                     \
                                                                              \
-      if (localcanon !=        NULL)                                                 \
+      if (localcanon !=        NULL && canon == NULL)                                \
        canon = strdupa (localcanon);                                         \
                                                                              \
       if (_family == AF_INET6 && i > 0)                                              \