diff options
-rw-r--r-- | login-utils/su-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/su-common.c b/login-utils/su-common.c index bfccb4643..f873c23bc 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -273,7 +273,7 @@ static void pty_create(struct su_context *su) rc = openpty(&su->pty_master, &su->pty_slave, NULL, NULL, NULL); /* set slave attributes */ - if (rc < 0) { + if (!rc) { tcgetattr(su->pty_slave, &slave_attrs); cfmakeraw(&slave_attrs); tcsetattr(su->pty_slave, TCSANOW, &slave_attrs); |