From: Wayne Davison Date: Sun, 22 Jan 2017 23:44:18 +0000 (-0800) Subject: Join some lines. X-Git-Tag: v3.1.3pre1~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a4e8b552d6a99373ef1c8cdb075568e755b5f402;p=thirdparty%2Frsync.git Join some lines. --- diff --git a/exclude.c b/exclude.c index 0aaa19b1..b8e0b870 100644 --- 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 54ced36d..226ac8aa 100644 --- 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]; diff --git a/xattrs.c b/xattrs.c index f4de3629..93f937dd 100644 --- 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++) {