1999-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* inet/rcmd.c (__icheckhost): Fix typo in last patch.

1999-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* wcsmbs/wcschr.c (wcschr): Fix last patch: Add missing semicolon.
	* wcsmbs/wcsrchr.c (wcsrchr): Likewise.

1999-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* posix/wordexp.c (parse_tilde): Handle failing call to
	get.*_r functions correctly for non-existing entry.
	* sysdeps/posix/cuserid.c (cuserid): Likewise.
	* sysdeps/posix/getaddrinfo.c (gaih_inet_serv): Likewise.
This commit is contained in:
Ulrich Drepper 1999-07-01 21:13:35 +00:00
parent 1d863dc0b4
commit c5f57c58ca
7 changed files with 25 additions and 9 deletions

View File

@ -1,3 +1,19 @@
1999-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* inet/rcmd.c (__icheckhost): Fix typo in last patch.
1999-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* wcsmbs/wcschr.c (wcschr): Fix last patch: Add missing semicolon.
* wcsmbs/wcsrchr.c (wcsrchr): Likewise.
1999-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* posix/wordexp.c (parse_tilde): Handle failing call to
get.*_r functions correctly for non-existing entry.
* sysdeps/posix/cuserid.c (cuserid): Likewise.
* sysdeps/posix/getaddrinfo.c (gaih_inet_serv): Likewise.
1999-06-30 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/gethostid.c: Handle failing call to

View File

@ -472,8 +472,7 @@ __icheckhost (raddr, lhost, rhost)
buffer = __alloca (buflen);
save_errno = errno;
while (__gethostbyname_r (lhost, &hostbuf, buffer, buflen, &hp, &herr)
!= 0
|| hp = NULL)
!= 0)
if (herr != NETDB_INTERNAL || errno != ERANGE)
return (0);
else {

View File

@ -311,7 +311,7 @@ parse_tilde (char **word, size_t *word_length, size_t *max_length,
buffer = __alloca (buflen);
}
if (result == 0 && pwd.pw_dir != NULL)
if (result == 0 && tpwd != NULL && pwd.pw_dir != NULL)
{
*word = w_addstr (*word, word_length, max_length, pwd.pw_dir);
if (*word == NULL)
@ -340,7 +340,7 @@ parse_tilde (char **word, size_t *word_length, size_t *max_length,
buffer = __alloca (buflen);
}
if (result == 0 && pwd.pw_dir)
if (result == 0 && tpwd != NULL && pwd.pw_dir)
*word = w_addstr (*word, word_length, max_length, pwd.pw_dir);
else
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1996, 1998 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1996, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -34,7 +34,8 @@ cuserid (s)
struct passwd pwent;
struct passwd *pwptr;
if (__getpwuid_r (__geteuid (), &pwent, buf, sizeof (buf), &pwptr))
if (__getpwuid_r (__geteuid (), &pwent, buf, sizeof (buf), &pwptr)
|| pwptr == NULL)
{
if (s != NULL)
s[0] = '\0';

View File

@ -206,7 +206,7 @@ gaih_inet_serv (const char *servicename, struct gaih_typeproto *tp,
r = __getservbyname_r (servicename, tp->name, &ts, tmpbuf, tmpbuflen,
&s);
if (r)
if (r || s == NULL)
{
if (errno == ERANGE)
tmpbuflen *= 2;

View File

@ -28,7 +28,7 @@ wcschr (wcs, wc)
do
if (*wcs == wc)
return (wchar_t *) wcs;
while (*wcs++ != L'\0')
while (*wcs++ != L'\0');
return NULL;
}

View File

@ -31,7 +31,7 @@ wcsrchr (wcs, wc)
do
if (*wcs == wc)
retval = wcs;
while (*wcs++ != L'\0')
while (*wcs++ != L'\0');
return (wchar_t *) retval;
}