summaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-07-01 22:16:41 +0000
committerRoland McGrath <roland@gnu.org>1996-07-01 22:16:41 +0000
commit3776d592f117c8c5b0d2c37d265cb8ee2ac21695 (patch)
tree9cae15e988bc6b4eb1e2737db59bceaab58e0be7 /resolv
parent7cbc698400bfe2a64f12b0cb703fda0fdecb5a59 (diff)
downloadglibc-3776d592f117c8c5b0d2c37d265cb8ee2ac21695.tar.gz
Mon Jul 1 12:29:50 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* nss/Makefile (databases): Change host to hosts. * nss/host-lookup.c: Renamed to nss/hosts-lookup.c.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_hconf.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c
index b08dd3ced7..fbf74d4125 100644
--- a/resolv/res_hconf.c
+++ b/resolv/res_hconf.c
@@ -69,24 +69,6 @@ static struct cmd {
};
-/*
- * Why isn't this in stdlib?
- */
-char *
-strndup (const char * s, size_t n)
-{
- char * retval;
-
- retval = malloc (n + 1);
- if (!retval)
- return retval;
-
- memcpy (retval, s, n);
- retval[n] = '\0'; /* ensure return value is terminated */
- return retval;
-}
-
-
/* Skip white space. */
static const char *
skip_ws (const char * str)
@@ -194,7 +176,7 @@ arg_trimdomain_list (const char * fname, int line_num, const char * args,
return 0;
}
_res_hconf.trimdomain[_res_hconf.num_trimdomains++] =
- strndup (start, len);
+ strndup (start, len);
args = skip_ws (args);
switch (*args)
{