summaryrefslogtreecommitdiff
path: root/lib/libc_r/TEST
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-05-26 00:08:22 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-05-26 00:08:22 +0000
commitaec11aa3e9e9096fa662c74fa4cbf929ea4f48a3 (patch)
treea3cce03cffc5bb64d29a0a7fccf27b4faa49941a /lib/libc_r/TEST
parente0d576b0027595335bdcebdd114b5d4030eb785c (diff)
bye bye gethostbyname_r and getservbyname_r tests
Diffstat (limited to 'lib/libc_r/TEST')
-rw-r--r--lib/libc_r/TEST/test_netdb.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/libc_r/TEST/test_netdb.c b/lib/libc_r/TEST/test_netdb.c
index b4853030a5f..15e72aef0c7 100644
--- a/lib/libc_r/TEST/test_netdb.c
+++ b/lib/libc_r/TEST/test_netdb.c
@@ -20,33 +20,19 @@
static void test_serv()
{
struct servent *serv;
- char answer[1024];
CHECKhn(serv = getservbyname("telnet", "tcp"));
printf("getservbyname -> port %d\n", ntohs(serv->s_port));
-
- CHECKhn(serv = getservbyname_r("telnet", "tcp", serv, answer, 1024));
- printf("getservbyname_r -> port %d\n", ntohs(serv->s_port));
}
static void test_host()
{
struct hostent *host;
struct in_addr addr;
- char answer[1024];
- int error;
CHECKhn(host = gethostbyname("localhost"));
memcpy(&addr, host->h_addr, sizeof(addr));
printf("gethostbyname -> %s\n", inet_ntoa(addr));
-
- if ((host = gethostbyname_r("localhost", host, answer, 1024, &error))
- != NULL) {
- memcpy(&addr, host->h_addr, sizeof(addr));
- printf("gethostbyname_r -> %s\n", inet_ntoa(addr));
- } else {
- DIE(error, "gethostbyname_r");
- }
}
static void test_localhost()