diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-07-19 21:57:35 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-07-19 21:57:35 +0000 |
commit | 1bcf7626ee3d23d7906d15f196d9791bee66cbe0 (patch) | |
tree | 0df790e92d55eb42c6fd3f8c13d252077b2632f9 /usr.bin/oldrdist/expand.c | |
parent | d62a5c66cb10886e1f037eab3be26d8424fc486e (diff) |
oldrdist now uses rsh so doesn't need to be setuid.
Incorporates some changes from Chris Siebenmann <cks@utcc.utoronto.ca>
and rdist 6.1.2. Also fixes at least one possible core dump and
uses strr?chr() instead of r?index().
Diffstat (limited to 'usr.bin/oldrdist/expand.c')
-rw-r--r-- | usr.bin/oldrdist/expand.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/oldrdist/expand.c b/usr.bin/oldrdist/expand.c index 48206e93de5..da7ac44df59 100644 --- a/usr.bin/oldrdist/expand.c +++ b/usr.bin/oldrdist/expand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expand.c,v 1.2 1996/06/26 05:37:38 deraadt Exp $ */ +/* $OpenBSD: expand.c,v 1.3 1996/07/19 21:57:32 millert Exp $ */ /* * Copyright (c) 1983, 1993 @@ -35,7 +35,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)expand.c 8.1 (Berkeley) 6/9/93"; */ -static char *rcsid = "$OpenBSD: expand.c,v 1.2 1996/06/26 05:37:38 deraadt Exp $"; +static char *rcsid = "$OpenBSD: expand.c,v 1.3 1996/07/19 21:57:32 millert Exp $"; #endif /* not lint */ #include "defs.h" @@ -156,7 +156,7 @@ expstr(s) if (s == NULL || *s == '\0') return; - if ((which & E_VARS) && (cp = index(s, '$')) != NULL) { + if ((which & E_VARS) && (cp = strchr(s, '$')) != NULL) { *cp++ = '\0'; if (*cp == '\0') { yyerror("no variable name after '$'"); @@ -164,7 +164,7 @@ expstr(s) } if (*cp == LC) { cp++; - if ((tail = index(cp, RC)) == NULL) { + if ((tail = strchr(cp, RC)) == NULL) { yyerror("unmatched '{'"); return; } |