From b51b1e81ea6eb0956522dfb8e118dad076fc0b61 Mon Sep 17 00:00:00 2001 From: tjr Date: Sat, 4 Jan 2003 08:10:55 +0000 Subject: Fix three warnings: o #include to make sprintf()'s prototype visible. o Remove unused variable: sbuf. o Don't use assignment as truth value. --- lib/libc/stdlib/grantpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/stdlib/grantpt.c b/lib/libc/stdlib/grantpt.c index 3e69f17..3b7a0e9 100644 --- a/lib/libc/stdlib/grantpt.c +++ b/lib/libc/stdlib/grantpt.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -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. -- cgit v1.1