summaryrefslogtreecommitdiff
path: root/inet/getnameinfo.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-04-24 08:55:46 +0000
committerJakub Jelinek <jakub@redhat.com>2006-04-24 08:55:46 +0000
commitd0145e03799e484f3a53d79de3b3f34162ee9d3c (patch)
treed8c51a0952204f9015de0db3319d4c820e8646e0 /inet/getnameinfo.c
parentf5ce81c94cc27035f44d37bffa7f7e08dbce7631 (diff)
Updated to fedora-glibc-20060424T0820
Diffstat (limited to 'inet/getnameinfo.c')
-rw-r--r--inet/getnameinfo.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/inet/getnameinfo.c b/inet/getnameinfo.c
index 493a423c10..5057fd221a 100644
--- a/inet/getnameinfo.c
+++ b/inet/getnameinfo.c
@@ -403,25 +403,16 @@ getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
if (!(flags & NI_NUMERICSERV))
{
struct servent *s, ts;
- while (__getservbyport_r (((const struct sockaddr_in *) sa)->sin_port,
- ((flags & NI_DGRAM) ? "udp" : "tcp"),
- &ts, tmpbuf, tmpbuflen, &s))
+ int e;
+ while ((e = __getservbyport_r (((const struct sockaddr_in *) sa)->sin_port,
+ ((flags & NI_DGRAM)
+ ? "udp" : "tcp"),
+ &ts, tmpbuf, tmpbuflen, &s)))
{
- if (herrno == NETDB_INTERNAL)
- {
- if (errno == ERANGE)
- tmpbuf = extend_alloca (tmpbuf, tmpbuflen,
- 2 * tmpbuflen);
- else
- {
- __set_errno (serrno);
- return EAI_SYSTEM;
- }
- }
+ if (e == ERANGE)
+ tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen);
else
- {
- break;
- }
+ break;
}
if (s)
{