Changeset ba344291 in rtems


Ignore:
Timestamp:
May 27, 2010, 4:50:01 PM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
3b8ab757
Parents:
d5143ba
Message:

2010-05-27 Ralf Corsépius <ralf.corsepius@…>

  • libnetworking/libc/gethostnamadr.c: Try to make crazy address arithmetic more portable.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rd5143ba rba344291  
    112010-05-27      Ralf Corsépius <ralf.corsepius@rtems.org>
    22
     3        * libnetworking/libc/gethostnamadr.c:
     4        Try to make crazy address arithmetic more portable.
    35        * libfs/src/nfsclient/src/xdr_mbuf.c:
    46        Use void* arithmetic instead of u_long arithmetic.
  • cpukit/libnetworking/libc/gethostnamadr.c

    rd5143ba rba344291  
    382382
    383383  result->h_addr_list=(char**)(buf+strlen(name)+1);
    384   result->h_addr_list+=sizeof(unsigned long)-((unsigned long)(result->h_addr_list)&(sizeof(unsigned long)-1));
     384  result->h_addr_list+=sizeof(char*)-((size_t)(result->h_addr_list)&(sizeof(char*)-1));
    385385  result->h_addr_list[0]=(char*)&result->h_addr_list[2];
    386386  if (inet_pton(AF_INET,name,result->h_addr_list[0])) {
Note: See TracChangeset for help on using the changeset viewer.