summaryrefslogtreecommitdiffstats
path: root/Source/CTest/Curl/hostip.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/Curl/hostip.c')
-rw-r--r--Source/CTest/Curl/hostip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CTest/Curl/hostip.c b/Source/CTest/Curl/hostip.c
index c2012ca..b525007 100644
--- a/Source/CTest/Curl/hostip.c
+++ b/Source/CTest/Curl/hostip.c
@@ -474,11 +474,11 @@ static struct hostent* pack_hostent(char** buf, struct hostent* orig)
/* now, shrink the allocated buffer to the size we actually need, which
most often is only a fraction of the original alloc */
- newbuf=(struct hostent *)realloc(*buf, (int)bufptr-(int)(*buf));
+ newbuf=(struct hostent *)realloc(*buf, (int)(bufptr-*buf));
/* if the alloc moved, we need to adjust things again */
if((char*)newbuf != *buf)
- hostcache_fixoffset((struct hostent*)newbuf, (int)newbuf-(int)*buf);
+ hostcache_fixoffset((struct hostent*)newbuf, (int)((char*)newbuf-*buf));
/* setup the return */
*buf = (char*)newbuf;