mirror of
https://github.com/alrayyes/st.git
synced 2024-11-22 03:16:22 +00:00
simplify control flow
This commit is contained in:
parent
0b3510df45
commit
693e2413c8
1 changed files with 1 additions and 3 deletions
4
std.c
4
std.c
|
@ -109,11 +109,9 @@ getpty(void) {
|
|||
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) {
|
||||
|
|
Loading…
Reference in a new issue