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 | 693e2413c8c114c6a95327a609c28be643b9d582 (patch) | |
| tree | 7c9ed81ed29d296e3d633106717a830a275b31d1 | |
| parent | remove debug code (diff) | |
| download | st-693e2413c8c114c6a95327a609c28be643b9d582.tar.gz st-693e2413c8c114c6a95327a609c28be643b9d582.zip | |
simplify control flow
| -rw-r--r-- | std.c | 4 |
1 files changed, 1 insertions, 3 deletions
| @@ -109,11 +109,9 @@ getpty(void) { | |||
| 109 | ptm = posix_openpt(O_RDWR); | 109 | ptm = posix_openpt(O_RDWR); |
| 110 | #else | 110 | #else |
| 111 | ptm = open("/dev/ptmx", O_RDWR); | 111 | ptm = open("/dev/ptmx", O_RDWR); |
| 112 | if(ptm == -1) { | 112 | if(ptm == -1) |
| 113 | if(openpty(&ptm, &pts, NULL, NULL, NULL) == -1) | 113 | if(openpty(&ptm, &pts, NULL, NULL, NULL) == -1) |
| 114 | eprintn("error, cannot open pty"); | 114 | eprintn("error, cannot open pty"); |
| 115 | return; | ||
| 116 | } | ||
| 117 | #endif | 115 | #endif |
| 118 | #if defined(_XOPEN_SOURCE) | 116 | #if defined(_XOPEN_SOURCE) |
| 119 | if(ptm != -1) { | 117 | if(ptm != -1) { |
