diff options
author | imp <imp@FreeBSD.org> | 1999-04-25 21:13:34 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1999-04-25 21:13:34 +0000 |
commit | 321c551969cc862a859c9e79c8404af90c94e81d (patch) | |
tree | 5ede02d61e978d083db7e7833d1560584b758dc1 /bin/cp/cp.c | |
parent | 4be4456eab17cc243bba5d62ce59ba675507482b (diff) | |
download | FreeBSD-src-321c551969cc862a859c9e79c8404af90c94e81d.zip FreeBSD-src-321c551969cc862a859c9e79c8404af90c94e81d.tar.gz |
First set of fixes to keep egcs happy. These include {} around single
statement if blocks[*] when the else could be ambiguous, not defaulting
to int type and removal of some unused variables.
[*] This is explicitly allowed by style(9) when the single statement
spans more than one line.
Reviewed by: obrien, chuckr
Diffstat (limited to 'bin/cp/cp.c')
-rw-r--r-- | bin/cp/cp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c index bf89011..e3ddbfa 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -45,7 +45,7 @@ static char const copyright[] = static char sccsid[] = "@(#)cp.c 8.2 (Berkeley) 4/1/94"; #endif static const char rcsid[] = - "$Id: cp.c,v 1.16 1998/05/13 07:25:14 charnier Exp $"; + "$Id: cp.c,v 1.17 1998/06/09 13:42:51 dt Exp $"; #endif /* not lint */ /* @@ -295,7 +295,7 @@ copy(argv, type, fts_options) * Since the first level MUST be FTS_ROOTLEVEL, base * is always initialized. */ - if (curr->fts_level == FTS_ROOTLEVEL) + if (curr->fts_level == FTS_ROOTLEVEL) { if (type != DIR_TO_DNE) { p = strrchr(curr->fts_path, '/'); base = (p == NULL) ? 0 : @@ -306,6 +306,7 @@ copy(argv, type, fts_options) base += 1; } else base = curr->fts_pathlen; + } p = &curr->fts_path[base]; nlen = curr->fts_pathlen - base; |