]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commit
dnet: fix strict aliasing warnings
authorMike Frysinger <vapier@gentoo.org>
Wed, 9 Jun 2010 14:52:41 +0000 (14:52 +0000)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 23 Jul 2010 19:30:48 +0000 (12:30 -0700)
commit9ec0e899e13f01e44e8111179910e5d57ced2c4a
treef003a2af52744411b75ef4ff8371c01ce5013cfc
parent0156412215abec067ff08d760f454adbccb9a13f
dnet: fix strict aliasing warnings

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: Mike Frysinger <vapier@gentoo.org>
lib/dnet_ntop.c
lib/dnet_pton.c