summaryrefslogtreecommitdiffstats
path: root/bin/cp/utils.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-04-25 21:13:34 +0000
committerimp <imp@FreeBSD.org>1999-04-25 21:13:34 +0000
commit321c551969cc862a859c9e79c8404af90c94e81d (patch)
tree5ede02d61e978d083db7e7833d1560584b758dc1 /bin/cp/utils.c
parent4be4456eab17cc243bba5d62ce59ba675507482b (diff)
downloadFreeBSD-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/utils.c')
-rw-r--r--bin/cp/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index f6c0f0d..9118efc 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94";
#endif
static const char rcsid[] =
- "$Id: utils.c,v 1.20 1998/06/10 06:29:23 peter Exp $";
+ "$Id: utils.c,v 1.21 1998/11/18 11:47:45 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -183,7 +183,7 @@ copy_file(entp, dne)
*/
#define RETAINBITS \
(S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
- else if (fs->st_mode & (S_ISUID | S_ISGID) && fs->st_uid == myuid)
+ else if (fs->st_mode & (S_ISUID | S_ISGID) && fs->st_uid == myuid) {
if (fstat(to_fd, &to_stat)) {
warn("%s", to.p_path);
rval = 1;
@@ -192,6 +192,7 @@ copy_file(entp, dne)
warn("%s", to.p_path);
rval = 1;
}
+ }
(void)close(from_fd);
if (close(to_fd)) {
warn("%s", to.p_path);
OpenPOWER on IntegriCloud