Browse Source

simplify control flow

master
Matthias-Christian Ott 16 years ago
parent
commit
693e2413c8
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      std.c

+ 1
- 3
std.c View File

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


Loading…
Cancel
Save