diff options
Diffstat (limited to 'sysdeps/unix/grantpt.c')
-rw-r--r-- | sysdeps/unix/grantpt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/grantpt.c b/sysdeps/unix/grantpt.c index 65a0d98a73..24f0e17792 100644 --- a/sysdeps/unix/grantpt.c +++ b/sysdeps/unix/grantpt.c @@ -47,9 +47,9 @@ grantpt (fd) char namebuf[PTYNAMELEN]; /* Some systems do it for us. */ - if (__ptsname_r (fd, namebuf, PTYNAMELEN) == NULL) + if (__ptsname_r (fd, namebuf, PTYNAMELEN) != 0) return -1; - if (stat (namebuf, &st)) + if (__xstat (_STAT_VER, namebuf, &st) != 0) return -1; if (st.st_uid == getuid ()) |