@@ -407,7 +407,7 @@ main(int ac, char **av)
407407 (long long )CountTargetReadBytes ,
408408 (long long )CountWriteBytes ,
409409 ((double )CountSourceBytes * 2.0 ) / ((double )(CountSourceReadBytes + CountTargetReadBytes + CountWriteBytes )));
410- logstd ("%lld source items, %lld items copied, %lld items linked, "
410+ logstd ("%lld source items, %lld items copied, %lld items linked, "
411411 "%lld things deleted\n" ,
412412 (long long )CountSourceItems ,
413413 (long long )CountCopiedItems ,
@@ -512,14 +512,14 @@ OwnerMatch(struct stat *st1, struct stat *st2)
512512static int
513513FlagsMatch (struct stat * st1 , struct stat * st2 )
514514{
515- /*
516- * Ignore UF_ARCHIVE. It gets set automatically by the filesystem, for
517- * filesystems that support it. If the destination filesystem supports it, but
518- * it's cleared on the source file, then multiple invocations of cpdup would
519- * all try to copy the file because the flags wouldn't match.
520- *
521- * When unpriveleged, ignore flags we can't set
522- */
515+ /*
516+ * Ignore UF_ARCHIVE. It gets set automatically by the filesystem, for
517+ * filesystems that support it. If the destination filesystem supports it,
518+ * but it's cleared on the source file, then multiple invocations of cpdup
519+ * would all try to copy the file because the flags wouldn't match.
520+ *
521+ * When unpriveleged, ignore flags we can't set
522+ */
523523 u_long ignored = DstRootPrivs ? 0 : SF_SETTABLE ;
524524
525525#ifdef UF_ARCHIVE
@@ -539,7 +539,7 @@ hltlookup(struct stat *stp)
539539 n = stp -> st_ino & HLMASK ;
540540
541541 for (hl = hltable [n ]; hl ; hl = hl -> next ) {
542- if (hl -> ino == stp -> st_ino ) {
542+ if (hl -> ino == stp -> st_ino ) {
543543 ++ hl -> refs ;
544544 return hl ;
545545 }
@@ -775,13 +775,12 @@ DoCopy(copy_info_t info, struct stat *stat1, int depth)
775775 if (xlink (hln -> name , dpath , stat1 -> st_flags ) < 0 ) {
776776 int tryrelink = (errno == EMLINK );
777777 logerr ("%-32s hardlink: unable to link to %s: %s\n" ,
778- (dpath ? dpath : spath ), hln -> name , strerror (errno )
779- );
778+ (dpath ? dpath : spath ), hln -> name , strerror (errno ));
780779 hltdelete (hln );
781780 hln = NULL ;
782781 if (tryrelink ) {
783782 logerr ("%-20s hardlink: will attempt to copy normally\n" ,
784- (dpath ? dpath : spath ));
783+ (dpath ? dpath : spath ));
785784 goto relink ;
786785 }
787786 ++ r ;
@@ -792,10 +791,8 @@ DoCopy(copy_info_t info, struct stat *stat1, int depth)
792791 }
793792 if (r == 0 ) {
794793 if (VerboseOpt ) {
795- logstd ("%-32s hardlink: %s\n" ,
796- (dpath ? dpath : spath ),
797- (st2Valid ? "relinked" : "linked" )
798- );
794+ logstd ("%-32s hardlink: %s\n" , (dpath ? dpath : spath ),
795+ (st2Valid ? "relinked" : "linked" ));
799796 }
800797 CountSourceItems ++ ;
801798 CountCopiedItems ++ ;
@@ -920,9 +917,9 @@ DoCopy(copy_info_t info, struct stat *stat1, int depth)
920917 skipdir = 1 ;
921918 }
922919 if (hc_lstat (& DstHost , dpath , & st2 ) != 0 ) {
923- if (NotForRealOpt == 0 )
924- logerr ("%s: lstat of newly made dir failed: %s\n" ,
925- (dpath ? dpath : spath ), strerror (errno ));
920+ if (! NotForRealOpt )
921+ logerr ("%s: lstat of newly made dir failed: %s\n" ,
922+ (dpath ? dpath : spath ), strerror (errno ));
926923 st2Valid = 0 ;
927924 r = 1 ;
928925 skipdir = 1 ;
@@ -1093,14 +1090,14 @@ DoCopy(copy_info_t info, struct stat *stat1, int depth)
10931090 int fd2 ;
10941091
10951092 if (st2Valid )
1096- path = mprintf ("%s.tmp%d" , dpath , (int )getpid ());
1093+ path = mprintf ("%s.tmp%d" , dpath , (int )getpid ());
10971094 else
1098- path = mprintf ("%s" , dpath );
1095+ path = mprintf ("%s" , dpath );
10991096
1097+ #ifndef NOMD5
11001098 /*
11011099 * Handle check failure message.
11021100 */
1103- #ifndef NOMD5
11041101 if (mres < 0 )
11051102 logerr ("%-32s md5-CHECK-FAILED\n" , (dpath ) ? dpath : spath );
11061103#endif
@@ -1461,11 +1458,11 @@ ScanDir(List *list, struct HostConf *host, const char *path,
14611458 * ignore . and ..
14621459 */
14631460 if (strcmp (den -> d_name , "." ) != 0 && strcmp (den -> d_name , ".." ) != 0 ) {
1464- if (UseCpFile && UseCpFile [0 ] == '/' ) {
1465- if (CheckList (list , path , den -> d_name ) == 0 )
1466- continue ;
1467- }
1468- AddList (list , den -> d_name , n , statptr );
1461+ if (UseCpFile && UseCpFile [0 ] == '/' ) {
1462+ if (CheckList (list , path , den -> d_name ) == 0 )
1463+ continue ;
1464+ }
1465+ AddList (list , den -> d_name , n , statptr );
14691466 }
14701467 }
14711468 hc_closedir (host , dir );
@@ -1735,7 +1732,6 @@ YesNo(const char *path)
17351732 * destination and rename again. If that fails too, try to
17361733 * set the flags back the way they were and give up.
17371734 */
1738-
17391735static int
17401736xrename (const char * src , const char * dst , u_long flags )
17411737{
0 commit comments