projects
/
platform
/
upstream
/
linaro-glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
950094f
)
(gaih_inet): Check for rc == ERANGE, not rc == errno. Use extend_alloca.
author
Ulrich Drepper
<drepper@redhat.com>
Wed, 23 Apr 2003 17:19:51 +0000
(17:19 +0000)
committer
Ulrich Drepper
<drepper@redhat.com>
Wed, 23 Apr 2003 17:19:51 +0000
(17:19 +0000)
sysdeps/posix/getaddrinfo.c
patch
|
blob
|
history
diff --git
a/sysdeps/posix/getaddrinfo.c
b/sysdeps/posix/getaddrinfo.c
index
dd6e415
..
e016876
100644
(file)
--- a/
sysdeps/posix/getaddrinfo.c
+++ b/
sysdeps/posix/getaddrinfo.c
@@
-677,13
+677,11
@@
gaih_inet (const char *name, const struct gaih_service *service,
int herrno;
struct hostent th;
size_t tmpbuflen = 512;
- char *tmpbuf;
+ char *tmpbuf
= NULL
;
do
{
- tmpbuflen *= 2;
- tmpbuf = __alloca (tmpbuflen);
-
+ tmpbuf = extend_alloca (tmpbuf, tmpbuflen, tmpbuflen * 2);
rc = __gethostbyaddr_r (at2->addr,
((at2->family == AF_INET6)
? sizeof(struct in6_addr)
@@
-692,7
+690,7
@@
gaih_inet (const char *name, const struct gaih_service *service,
&h, &herrno);
}
- while (rc ==
errno
&& herrno == NETDB_INTERNAL);
+ while (rc ==
ERANGE
&& herrno == NETDB_INTERNAL);
if (rc != 0 && herrno == NETDB_INTERNAL)
{