summaryrefslogtreecommitdiff
path: root/inet
diff options
context:
space:
mode:
Diffstat (limited to 'inet')
-rw-r--r--inet/getnetgrent_r.c8
-rw-r--r--inet/herrno.c7
2 files changed, 6 insertions, 9 deletions
diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c
index ff6d5395ed..7288dbeb4c 100644
--- a/inet/getnetgrent_r.c
+++ b/inet/getnetgrent_r.c
@@ -113,7 +113,7 @@ internal_setnetgrent (const char *group)
/* Add the current group to the list of known groups. */
new_elem = (struct name_list *) malloc (sizeof (struct name_list));
- if (new_elem == NULL || (new_elem->name = strdup (group)) == NULL)
+ if (new_elem == NULL || (new_elem->name = __strdup (group)) == NULL)
{
if (new_elem != NULL)
free (new_elem);
@@ -178,7 +178,7 @@ endnetgrent (void)
int
__getnetgrent_r (char **hostp, char **userp, char **domainp,
- char *buffer, int buflen)
+ char *buffer, size_t buflen)
{
enum nss_status (*fct) (struct __netgrent *, char *, int);
struct __netgrent result;
@@ -230,7 +230,7 @@ __getnetgrent_r (char **hostp, char **userp, char **domainp,
namep = (struct name_list *) malloc (sizeof (struct name_list));
if (namep == NULL
- || (namep->name = strdup (result.val.group)) == NULL)
+ || (namep->name = __strdup (result.val.group)) == NULL)
{
/* We are out of memory. */
if (namep != NULL)
@@ -315,7 +315,7 @@ innetgr (const char *netgroup, const char *host, const char *user,
namep =
(struct name_list *) malloc (sizeof (*namep));
if (namep == NULL
- || ((namep->name = strdup (entry.val.group))
+ || ((namep->name = __strdup (entry.val.group))
== NULL))
{
/* Out of memory, simply return. */
diff --git a/inet/herrno.c b/inet/herrno.c
index ca92ec3b86..3143325e51 100644
--- a/inet/herrno.c
+++ b/inet/herrno.c
@@ -20,15 +20,12 @@ Boston, MA 02111-1307, USA. */
/* We need to have the error status variable of the resolver
accessible in the libc. */
-int __h_errno = 0;
-strong_alias (__h_errno, h_errno)
+int h_errno = 0;
/* When threaded, h_errno may be a per-process variable. */
-#ifdef __USE_REENTRANT
int *
weak_const_function
__h_errno_location (void)
{
- return &__h_errno;
+ return &h_errno;
}
-#endif