aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-01-18 12:59:33 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-01-18 12:59:33 +0000
commite74b20926d3c2ae25b0da03c1472065aa1c5eccc (patch)
tree3bd8ec7598f04d1f26c73f477a1d7422c2fc9421
parenta312127c9130d9874b265b580910055b0d1efe7b (diff)
prevents gcc -Wcast-align from complaining
-rw-r--r--lib/hostip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 6d79acb3b..9acb9a978 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -426,10 +426,10 @@ Curl_addrinfo *Curl_getaddrinfo(struct SessionHandle *data,
* everything. OSF1 is known to require at least 8872 bytes. The buffer
* required for storing all possible aliases and IP numbers is according to
* Stevens' Unix Network Programming 2nd editor, p. 304: 8192 bytes! */
- char *buf = (char *)malloc(CURL_NAMELOOKUP_SIZE);
+ int *buf = (int *)malloc(CURL_NAMELOOKUP_SIZE);
if(!buf)
return NULL; /* major failure */
- *bufp = buf;
+ *bufp = (char *)buf;
port=0; /* unused in IPv4 code */
ret = 0; /* to prevent the compiler warning */
@@ -459,7 +459,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct SessionHandle *data,
/* Solaris, IRIX and more */
if ((h = gethostbyname_r(hostname,
(struct hostent *)buf,
- buf + sizeof(struct hostent),
+ (char *)buf + sizeof(struct hostent),
CURL_NAMELOOKUP_SIZE - sizeof(struct hostent),
&h_errnop)) == NULL )
#endif