diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-07-01 18:27:19 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-07-28 00:27:58 -0400 |
commit | 726df5a8bc03a30afdb123edfeae5da180b77f79 (patch) | |
tree | dfcc41ca95d10a8f151dd4f688153cff405a64ac /src/stdio/fwide.c | |
parent | 37eb19e0908697e8ef810cf350a52d2009959f1a (diff) | |
download | musl-726df5a8bc03a30afdb123edfeae5da180b77f79.tar.gz |
fix aliasing violations in mbtowc and mbrtowc
these functions were setting wc to point to wchar_t aliasing itself as
a "cheap" way to support null wc arguments. doing so was anything but
cheap, since even without the aliasing violation, it would limit the
compiler's ability to optimize.
making wc point to a dummy object is equally easy and does not suffer
from the above problems.
(cherry picked from commit e89cfe51d2001af08fc2a13e5133ba8157f90beb)
Diffstat (limited to 'src/stdio/fwide.c')
0 files changed, 0 insertions, 0 deletions