Imported Upstream version 2.6.1
[debian/amanda] / gnulib / getaddrinfo.c
index 55462c43f9c3a2ff68b4fb667326810dcbc64957..b14f8096bd85463e5a34188af16fc31a9da0cd98 100644 (file)
@@ -5,7 +5,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
+   the Free Software Foundation; either version 3, or (at your option)
    any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -123,10 +123,10 @@ validate_family (int family)
 /* Translate name of a service location and/or a service name to set of
    socket addresses. */
 int
-getaddrinfo (const char *restrict nodename,
-            const char *restrict servname,
-            const struct addrinfo *restrict hints,
-            struct addrinfo **restrict res)
+getaddrinfo (const char *nodename,
+            const char *servname,
+            const struct addrinfo *hints,
+            struct addrinfo **res)
 {
   struct addrinfo *tmp;
   int port = 0;
@@ -332,14 +332,14 @@ freeaddrinfo (struct addrinfo *ai)
       cur = ai;
       ai = ai->ai_next;
 
-      if (cur->ai_canonname) free (cur->ai_canonname);
+      free (cur->ai_canonname);
       free (cur);
     }
 }
 
-int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,
-               char *restrict node, socklen_t nodelen,
-               char *restrict service, socklen_t servicelen,
+int getnameinfo(const struct sockaddr *sa, socklen_t salen,
+               char *node, socklen_t nodelen,
+               char *service, socklen_t servicelen,
                int flags)
 {
 #ifdef WIN32_NATIVE