aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/grantpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/grantpt.c')
-rw-r--r--sysdeps/unix/grantpt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/grantpt.c b/sysdeps/unix/grantpt.c
index 65a0d98..24f0e17 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 ())