diff options
author | Matthias-Christian Ott <ott@enolink.de> | 2008-06-02 20:01:35 +0200 |
---|---|---|
committer | Matthias-Christian Ott <ott@enolink.de> | 2008-06-02 20:01:35 +0200 |
commit | 4059fb04fa993305475446e2ab2cbb0a3c832203 (patch) | |
tree | 7c9ed81ed29d296e3d633106717a830a275b31d1 | |
parent | 1ebcc5c97b0894fd3aa4aa62923fb69ecb89fac4 (diff) | |
download | st-4059fb04fa993305475446e2ab2cbb0a3c832203.tar.gz st-4059fb04fa993305475446e2ab2cbb0a3c832203.tar.bz2 |
simplify control flow
-rw-r--r-- | std.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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) { |