[rtems commit] 2010-05-27 Ralf Cors =?UTF-8?Q?=C3=A9pius=20?=<ralf.corsepius at rtems.org>
Sebastian Huber
sebh at rtems.org
Mon Nov 24 08:15:34 UTC 2014
Module: rtems
Branch: 4.9
Commit: ca3086610064072df20fb08998f88d373dd4ab96
Changeset: http://git.rtems.org/rtems/commit/?id=ca3086610064072df20fb08998f88d373dd4ab96
Author: Ralf Corsepius <ralf.corsepius at rtems.org>
Date: Thu May 27 16:50:01 2010 +0000
2010-05-27 Ralf Corsépius <ralf.corsepius at rtems.org>
* libnetworking/libc/gethostnamadr.c:
Try to make crazy address arithmetic more portable.
---
cpukit/libnetworking/libc/gethostnamadr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpukit/libnetworking/libc/gethostnamadr.c b/cpukit/libnetworking/libc/gethostnamadr.c
index d67890a..1ae4a02 100644
--- a/cpukit/libnetworking/libc/gethostnamadr.c
+++ b/cpukit/libnetworking/libc/gethostnamadr.c
@@ -378,7 +378,7 @@ int gethostbyname_r(const char* name,
strcpy(buf,name);
result->h_addr_list=(char**)(buf+strlen(name)+1);
- result->h_addr_list+=sizeof(unsigned long)-((unsigned long)(result->h_addr_list)&(sizeof(unsigned long)-1));
+ result->h_addr_list+=sizeof(char*)-((size_t)(result->h_addr_list)&(sizeof(char*)-1));
result->h_addr_list[0]=(char*)&result->h_addr_list[2];
if (inet_pton(AF_INET,name,result->h_addr_list[0])) {
result->h_addrtype=AF_INET;
More information about the vc
mailing list