diff options
Diffstat (limited to 'libbb/getpty.c')
-rw-r--r-- | libbb/getpty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/getpty.c b/libbb/getpty.c index 435e4d09f..391d729f2 100644 --- a/libbb/getpty.c +++ b/libbb/getpty.c | |||
@@ -16,7 +16,7 @@ int FAST_FUNC xgetpty(char *line) | |||
16 | 16 | ||
17 | #if ENABLE_FEATURE_DEVPTS | 17 | #if ENABLE_FEATURE_DEVPTS |
18 | p = open("/dev/ptmx", O_RDWR); | 18 | p = open("/dev/ptmx", O_RDWR); |
19 | if (p > 0) { | 19 | if (p >= 0) { |
20 | grantpt(p); /* chmod+chown corresponding slave pty */ | 20 | grantpt(p); /* chmod+chown corresponding slave pty */ |
21 | unlockpt(p); /* (what does this do?) */ | 21 | unlockpt(p); /* (what does this do?) */ |
22 | # ifndef HAVE_PTSNAME_R | 22 | # ifndef HAVE_PTSNAME_R |