diff options
Diffstat (limited to 'lib/libc/gen/popen.c')
-rw-r--r-- | lib/libc/gen/popen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c index ccb2230ca51..9372d0ebf89 100644 --- a/lib/libc/gen/popen.c +++ b/lib/libc/gen/popen.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: popen.c,v 1.6 1997/06/22 23:18:55 tholo Exp $"; +static char rcsid[] = "$OpenBSD: popen.c,v 1.7 1997/07/09 00:28:23 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -64,7 +64,7 @@ popen(program, type) FILE *iop; int pdes[2], pid; - if (*type != 'r' && *type != 'w' || type[1]) { + if ((*type != 'r' && *type != 'w') || type[1] != '\0') { errno = EINVAL; return (NULL); } |