ptsname_r: Fix typo in last commit.
authorBruno Haible <bruno@clisp.org>
Sun, 24 Jun 2012 23:59:31 +0000 (01:59 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 24 Jun 2012 23:59:31 +0000 (01:59 +0200)
lib/ptsname_r.c

index 1d0ba82..140a75b 100644 (file)
@@ -138,7 +138,7 @@ __ptsname_r (int fd, char *buf, size_t buflen)
     ret = ioctl (fd, ISPTM, NULL);
     dev = ret;
 # endif
-    if (dev < 0)
+    if (ret < 0)
       {
         errno = ENOTTY;
         return errno;