1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-05 00:02:41 +03:00
Files
glibc/sysdeps/unix/sysv/linux/ttyname.c
Érico Nogueira 05ae46ee7a linux: implement ttyname as a wrapper around ttyname_r.
Big win in binary size and avoids duplicating the logic in multiple
places.

On x86_64, dropped from 1883206 to 1881790, a 1416 byte decrease.

Also changed logic to track if ttyname_buf has been allocated by
checking if it's NULL instead of tracking buflen as an additional
variable.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-07 13:56:02 -03:00

1.7 KiB