aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/device-nrs.h
diff options
context:
space:
mode:
authorCollin Funk <collin.funk1@gmail.com>2025-05-04 19:31:34 -0700
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-05-06 13:31:59 -0300
commitb4495bd40578b455668887b9170059bb0d3c0dc5 (patch)
treedc21dc2c26d88b579ef66e27abe88aa4fe268ee6 /sysdeps/unix/sysv/linux/device-nrs.h
parentac4e8382899ccf4ada1cd2f1dafdcdf40d31ec7d (diff)
downloadglibc-master.zip
glibc-master.tar.gz
glibc-master.tar.bz2
nss: remove undefined behavior and optimize getaddrinfoHEADmaster
On x86-64 and compiling with -O2 using stdc_leading_zeros compiles to the bsr instruction. The fls function removed by this patch is inlined but still loops while checking each bit individually. * nss/getaddrinfo.c: Include <stdbit.h>. (fls): Remove function. This function contains a left shift of 31 on an 'int' which is undefined. (rfc3484_sort): Use stdc_leading_zeros instead of fls. Signed-off-by: Collin Funk <collin.funk1@gmail.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux/device-nrs.h')
0 files changed, 0 insertions, 0 deletions