]> git.samba.org - rsync.git/commitdiff
Join some lines.
authorWayne Davison <wayned@samba.org>
Sun, 22 Jan 2017 23:44:18 +0000 (15:44 -0800)
committerWayne Davison <wayned@samba.org>
Sun, 22 Jan 2017 23:55:54 +0000 (15:55 -0800)
exclude.c
flist.c
xattrs.c

index 0aaa19b113f5ca7bbb643be47907872aad081674..b8e0b870e7d132f9f31d885c49602c45f0c0d64e 100644 (file)
--- a/exclude.c
+++ b/exclude.c
@@ -730,22 +730,19 @@ int check_filter(filter_rule_list *listp, enum logcode code,
                if (ignore_perishable && ent->rflags & FILTRULE_PERISHABLE)
                        continue;
                if (ent->rflags & FILTRULE_PERDIR_MERGE) {
-                       int rc = check_filter(ent->u.mergelist, code, name,
-                                             name_is_dir);
+                       int rc = check_filter(ent->u.mergelist, code, name, name_is_dir);
                        if (rc)
                                return rc;
                        continue;
                }
                if (ent->rflags & FILTRULE_CVS_IGNORE) {
-                       int rc = check_filter(&cvs_filter_list, code, name,
-                                             name_is_dir);
+                       int rc = check_filter(&cvs_filter_list, code, name, name_is_dir);
                        if (rc)
                                return rc;
                        continue;
                }
                if (rule_matches(name, ent, name_is_dir)) {
-                       report_filter_result(code, name, ent, name_is_dir,
-                                            listp->debug_type);
+                       report_filter_result(code, name, ent, name_is_dir, listp->debug_type);
                        return ent->rflags & FILTRULE_INCLUDE ? 1 : -1;
                }
        }
diff --git a/flist.c b/flist.c
index 54ced36d7ea8ceddbc2337599456d8d9a0564a12..226ac8aac3d744607f87a3f65a729be2009ee697 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -2967,8 +2967,7 @@ static void flist_sort_and_clean(struct file_list *flist, int strip_root)
                                        clear_file(fp);
                                }
                                prev_depth = F_DEPTH(file);
-                               if (is_excluded(f_name(file, fbuf), 1,
-                                                      ALL_FILTERS)) {
+                               if (is_excluded(f_name(file, fbuf), 1, ALL_FILTERS)) {
                                        /* Keep dirs through this dir. */
                                        for (j = prev_depth-1; ; j--) {
                                                fp = flist->sorted[prev_i];
index f4de36295168e4bcd6ad57cde213497fe7863edf..93f937dd34bf902c8043b0b33d03cb688f212845 100644 (file)
--- a/xattrs.c
+++ b/xattrs.c
@@ -250,16 +250,13 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
                list_len -= name_len;
 
 #ifdef HAVE_LINUX_XATTRS
-               /* We always ignore the system namespace, and non-root
-                * ignores everything but the user namespace. */
-               if (user_only ? !HAS_PREFIX(name, USER_PREFIX)
-                             : HAS_PREFIX(name, SYSTEM_PREFIX))
+               /* Choose between ignoring the system namespace or (non-root) ignoring any non-user namespace. */
+               if (user_only ? !HAS_PREFIX(name, USER_PREFIX) : HAS_PREFIX(name, SYSTEM_PREFIX))
                        continue;
 #endif
 
                /* No rsync.%FOO attributes are copied w/o 2 -X options. */
-               if (name_len > RPRE_LEN && name[RPRE_LEN] == '%'
-                && HAS_PREFIX(name, RSYNC_PREFIX)) {
+               if (name_len > RPRE_LEN && name[RPRE_LEN] == '%' && HAS_PREFIX(name, RSYNC_PREFIX)) {
                        if ((am_sender && preserve_xattrs < 2)
                         || (am_root < 0
                          && (strcmp(name+RPRE_LEN+1, XSTAT_SUFFIX) == 0
@@ -353,10 +350,8 @@ int copy_xattrs(const char *source, const char *dest)
                list_len -= name_len;
 
 #ifdef HAVE_LINUX_XATTRS
-               /* We always ignore the system namespace, and non-root
-                * ignores everything but the user namespace. */
-               if (user_only ? !HAS_PREFIX(name, USER_PREFIX)
-                             : HAS_PREFIX(name, SYSTEM_PREFIX))
+               /* Choose between ignoring the system namespace or (non-root) ignoring any non-user namespace. */
+               if (user_only ? !HAS_PREFIX(name, USER_PREFIX) : HAS_PREFIX(name, SYSTEM_PREFIX))
                        continue;
 #endif
 
@@ -860,6 +855,7 @@ void receive_xattr(int f, struct file_struct *file)
                        free(ptr);
                        continue;
                }
+
                rxa = EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, 1);
                rxa->name = name;
                rxa->datum = ptr;
@@ -1025,14 +1021,11 @@ static int rsync_xal_set(const char *fname, item_list *xalp,
                list_len -= name_len;
 
 #ifdef HAVE_LINUX_XATTRS
-               /* We always ignore the system namespace, and non-root
-                * ignores everything but the user namespace. */
-               if (user_only ? !HAS_PREFIX(name, USER_PREFIX)
-                             : HAS_PREFIX(name, SYSTEM_PREFIX))
+               /* Choose between ignoring the system namespace or (non-root) ignoring any non-user namespace. */
+               if (user_only ? !HAS_PREFIX(name, USER_PREFIX) : HAS_PREFIX(name, SYSTEM_PREFIX))
                        continue;
 #endif
-               if (am_root < 0 && name_len > RPRE_LEN
-                && name[RPRE_LEN] == '%' && strcmp(name, XSTAT_ATTR) == 0)
+               if (am_root < 0 && name_len > RPRE_LEN && name[RPRE_LEN] == '%' && strcmp(name, XSTAT_ATTR) == 0)
                        continue;
 
                for (i = 0; i < xalp->count; i++) {