diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-05-25 11:55:36 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-05-25 11:55:36 -0400 |
commit | ca02fe9b77037d56dd01ea7b5d33eebb62983e44 (patch) | |
tree | bec5ea0b7366669261a931a82c80b6c0d92bec3e /src/bar.c | |
parent | 598422e7678a719b37cc4221c637b840f4e13fcc (diff) | |
download | bfs-ca02fe9b77037d56dd01ea7b5d33eebb62983e44.tar.xz |
bfstd: New helper for open(ctermid())
Diffstat (limited to 'src/bar.c')
-rw-r--r-- | src/bar.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -144,14 +144,7 @@ struct bfs_bar *bfs_bar_show(void) { return NULL; } - char term[L_ctermid]; - ctermid(term); - if (strlen(term) == 0) { - errno = ENOTTY; - goto fail; - } - - bar->fd = open(term, O_RDWR | O_CLOEXEC); + bar->fd = open_cterm(O_RDWR | O_CLOEXEC); if (bar->fd < 0) { goto fail; } |