summaryrefslogtreecommitdiff
path: root/bin/cp/cp.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-06-25 04:35:32 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-06-25 04:35:32 +0000
commite65f58353b155d198ad89512cefd0499976d4f9c (patch)
tree29cc6c6663b58b7e5fd4b78b5679574d2fc0913c /bin/cp/cp.c
parent92f464fdb6d2bd36ecddfa6e216ebcf59571f1f9 (diff)
explicit braces to avoid ambiguous else
Diffstat (limited to 'bin/cp/cp.c')
-rw-r--r--bin/cp/cp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index 179d31d284b..b0e694cc129 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cp.c,v 1.16 2001/06/22 22:51:22 millert Exp $ */
+/* $OpenBSD: cp.c,v 1.17 2001/06/25 04:35:31 art Exp $ */
/* $NetBSD: cp.c,v 1.14 1995/09/07 06:14:51 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95";
#else
-static char rcsid[] = "$OpenBSD: cp.c,v 1.16 2001/06/22 22:51:22 millert Exp $";
+static char rcsid[] = "$OpenBSD: cp.c,v 1.17 2001/06/25 04:35:31 art Exp $";
#endif
#endif /* not lint */
@@ -331,7 +331,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 = find_last_component(curr->fts_path);
base = p - curr->fts_path;
@@ -341,6 +341,7 @@ copy(argv, type, fts_options)
base += 1;
} else
base = curr->fts_pathlen;
+ }
p = &curr->fts_path[base];
nlen = curr->fts_pathlen - base;