projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
remove __lock dependency from exit
[musl]
/
src
/
misc
/
openpty.c
diff --git
a/src/misc/openpty.c
b/src/misc/openpty.c
index
0b4eb22
..
1020247
100644
(file)
--- a/
src/misc/openpty.c
+++ b/
src/misc/openpty.c
@@
-12,7
+12,7
@@
int openpty(int *m, int *s, char *name, const struct termios *tio, const struct
char buf[20];
*m = open("/dev/ptmx", O_RDWR|O_NOCTTY);
- if (
!*m
) return -1;
+ if (
*m < 0
) return -1;
if (ioctl(*m, TIOCSPTLCK, &n) || ioctl (*m, TIOCGPTN, &n)) {
close(*m);