]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - nss/test-netdb.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / nss / test-netdb.c
index 6b34b1a8f1b07c6b0da00a3f11d7f5dfc646acb2..09bb8e6fd9bab8475400437cf3c7929b4b93e417 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2017 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 1998.
 
@@ -40,6 +40,8 @@
 #include <errno.h>
 #include "nss.h"
 
+#include <support/support.h>
+
 /*
   The following define is necessary for glibc 2.0.6
 */
@@ -177,7 +179,7 @@ test_hosts (void)
   while (gethostname (name, namelen) < 0 && errno == ENAMETOOLONG)
     {
       namelen += 2;            /* tiny increments to test a lot */
-      name = realloc (name, namelen);
+      name = xrealloc (name, namelen);
     }
   if (gethostname (name, namelen) == 0)
     {
@@ -336,5 +338,4 @@ do_test (void)
   return (error_count != 0);
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>