Changeset f313543e in rtems


Ignore:
Timestamp:
May 29, 2010, 4:35:29 AM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
1f868bd
Parents:
e04cfeb
Message:

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

  • libnetworking/net/if.c: Use uintptr_t and void* in _offsetof().
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    re04cfeb rf313543e  
    112010-05-29      Ralf Corsépius <ralf.corsepius@rtems.org>
    22
     3        * libnetworking/net/if.c:
     4        Use uintptr_t and void* in _offsetof().
    35        * libnetworking/netinet/raw_ip.c:
    46        Cast nam to uintptr_t instead of int.
  • cpukit/libnetworking/net/if.c

    re04cfeb rf313543e  
    135135         */
    136136        namelen = sprintf(workbuf, "%s%d", ifp->if_name, ifp->if_unit);
    137 #define _offsetof(t, m) ((int)((caddr_t)&((t *)0)->m))
     137#define _offsetof(t, m) ((uintptr_t)((void*)&((t *)0)->m))
    138138        masklen = _offsetof(struct sockaddr_dl, sdl_data[0]) + namelen;
    139139        socksize = masklen + ifp->if_addrlen;
Note: See TracChangeset for help on using the changeset viewer.