diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/misc/pty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc/pty.c b/src/misc/pty.c index 9e201ef3..b395d2c0 100644 --- a/src/misc/pty.c +++ b/src/misc/pty.c @@ -26,7 +26,7 @@ int __ptsname_r(int fd, char *buf, size_t len) { int pty, err; if (!buf) len = 0; - if ((err = __syscall(SYS_ioctl, fd, TIOCGPTN, &pty))) return err; + if ((err = __syscall(SYS_ioctl, fd, TIOCGPTN, &pty))) return -err; if (snprintf(buf, len, "/dev/pts/%d", pty) >= len) return ERANGE; return 0; } |