diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-05-19 11:19:49 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-05-19 11:19:49 -0400 |
commit | ff78355bc11257744759b5005d330e4a7583a4e4 (patch) | |
tree | 04e0b6ea729f6e6b7d50d2d09de73af9fd35066f /include/tgmath.h | |
parent | 9ca4dae5d895cf816eb1815511aba77a90f6acd7 (diff) | |
download | musl-ff78355bc11257744759b5005d330e4a7583a4e4.tar.gz |
rework sysconf table to treat zero entries as invalid
based on patch by Timo Teräs. previously, the value zero was used as a
literal zero, meaning that all invalid sysconf "names", which should
result in sysconf returning -1, had to be explicitly listed. (in
addition, it was not possible for sysconf to set errno to EINVAL, as
there was no distinction between -1 as an error and -1 as a valid
result.)
now, the value 0 is used for invalid/undefined slots in the table and
a new switch table entry is used for returning literal zeros.
in addition, an off-by-one error in checking against the table size is
fixed.
Diffstat (limited to 'include/tgmath.h')
0 files changed, 0 insertions, 0 deletions