summaryrefslogtreecommitdiff
path: root/include/sys/socket.h
diff options
context:
space:
mode:
authorinfo@mobile-stream.com2019-03-06 16:28:48 +0300
committersin2019-03-07 00:05:34 +0000
commit9b796691eb794e9f5279886e917c028a09f8a728 (patch)
tree74bba58483d903c2aa83b8c920784d7bb5e2f6ba /include/sys/socket.h
parentff82ffbc74d82091527449e31fe351d15830f716 (diff)
wctomb, wcrtomb: guard slow/trap path with MB_LEN_MAX
This allows the compiler to optimize out the slow/trap path at all for the typical correct code: char buf[MB_LEN_MAX]; r = wctomb(buf, c); The change tries to keep the "unknown object size" case handling in wcrtomb() as is even if it seems redundant and not helping (we copy __buf to possibly undersized __s in any case) and inconsistent with wctomb() (where we let the original library method itself overwrite the possibly undersized __s).
Diffstat (limited to 'include/sys/socket.h')
0 files changed, 0 insertions, 0 deletions