all repos — st @ 693e2413c8c114c6a95327a609c28be643b9d582

st (suckless terminal) config

simplify control flow
Matthias-Christian Ott ott@enolink.de
commit

693e2413c8c114c6a95327a609c28be643b9d582

parent

0b3510df45057bf63f0e3b5ce225ff4491912bb8

1 files changed, 1 insertions(+), 3 deletions(-)

jump to
M std.cstd.c

@@ -109,11 +109,9 @@ #elif _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600

ptm = posix_openpt(O_RDWR); #else ptm = open("/dev/ptmx", O_RDWR); - if(ptm == -1) { + if(ptm == -1) if(openpty(&ptm, &pts, NULL, NULL, NULL) == -1) eprintn("error, cannot open pty"); - return; - } #endif #if defined(_XOPEN_SOURCE) if(ptm != -1) {