diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2003-01-04 08:10:55 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2003-01-04 08:10:55 +0000 |
| commit | 2f693810598d6beee8fad936d2cc7a3e17859a0f (patch) | |
| tree | 6940fd82ff79916f84e4917c44a788814cfbafac /lib/libc/stdlib | |
| parent | 5dadd17b088462266c686111e24709ccfbbc01cc (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/grantpt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/grantpt.c b/lib/libc/stdlib/grantpt.c index 3e69f172d51e..3b7a0e9cdd92 100644 --- a/lib/libc/stdlib/grantpt.c +++ b/lib/libc/stdlib/grantpt.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include <grp.h> #include <paths.h> #include <signal.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sysexits.h> @@ -93,7 +94,6 @@ grantpt(int fildes) gid_t gid; char *slave; sigset_t oblock, nblock; - struct stat sbuf; struct group *grp; retval = -1; @@ -188,7 +188,7 @@ posix_openpt(int oflag) /* Cycle through all possible master PTY devices. */ for (pc1 = PT_DEV1; !bflag && (*mc1 = *pc1); ++pc1) - for (pc2 = PT_DEV2; *mc2 = *pc2; ++pc2) { + for (pc2 = PT_DEV2; (*mc2 = *pc2) != '\0'; ++pc2) { /* * Break out if we successfully open a PTY, * or if open() fails due to limits. |
