• Mike Frysinger's avatar
    dnet: fix strict aliasing warnings · 9ec0e899
    Mike Frysinger authored
    Recent gcc doesn't like it when you cast char pointers to uint16_t
    pointers and then dereference it.  So use memcpy() instead and let
    gcc take care of optimizing things away (when appropriate).  This
    should also fix alignment issues on arches where gcc packs the char
    pointer tighter than 16bits.
    Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
    9ec0e899
dnet_ntop.c 1.71 KB