diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-10-21 01:09:20 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-10-22 00:20:10 -0400 |
commit | 74e704006a0004058fc38806a19c1552b1e2463d (patch) | |
tree | 9cdfabba89d161a991ed93e0b9d368a59215c4b2 /src/locale/__lctrans.c | |
parent | 6753fb68b84cd7155d8b9a3a3bc3eff1ab6a8030 (diff) | |
download | musl-74e704006a0004058fc38806a19c1552b1e2463d.tar.gz musl-74e704006a0004058fc38806a19c1552b1e2463d.tar.xz musl-74e704006a0004058fc38806a19c1552b1e2463d.zip |
simplify newlocale and allow failure for explicit locale names
unify the code paths for allocated and non-allocated locale objects, always using a tmp object. this is necessary to avoid clobbering the base locale object too soon if we allow for the possibility that looking up an explicitly requested locale name may fail, and makes the code simpler and cleaner anyway. eliminate the complex and fragile logic for checking whether one of the non-allocated locale objects can be used for the result, and instead just memcmp against each of them.
Diffstat (limited to 'src/locale/__lctrans.c')
0 files changed, 0 insertions, 0 deletions