Tweaked set_allow_inc_recurse() a bit more.
[rsync/rsync.git] / exclude.c
index 96469ab..729cf97 100644 (file)
--- a/exclude.c
+++ b/exclude.c
@@ -26,7 +26,6 @@ extern int verbose;
 extern int am_server;
 extern int am_sender;
 extern int eol_nulls;
-extern int list_only;
 extern int recurse;
 extern int io_error;
 extern int local_server;
@@ -144,9 +143,8 @@ static void add_rule(struct filter_list_struct *listp, const char *pat,
                }
        }
 
-       if (!(ret = new(struct filter_struct)))
+       if (!(ret = new0(struct filter_struct)))
                out_of_memory("add_rule");
-       memset(ret, 0, sizeof ret[0]);
 
        if (!(mflags & (MATCHFLG_ABS_PATH | MATCHFLG_MERGE_FILE))
         && ((xflags & (XFLG_ANCHORED2ABS|XFLG_ABS_IF_SLASH) && *pat == '/')
@@ -1216,11 +1214,6 @@ void send_filter_list(int f_out)
                parse_rule(&filter_list, "-C", 0, 0);
        }
 
-       /* This is a complete hack - blame Rusty.  FIXME!
-        * Remove this hack when older rsyncs (below 2.6.4) are gone. */
-       if (list_only == 1 && !recurse)
-               parse_rule(&filter_list, "/*/*", MATCHFLG_NO_PREFIXES, 0);
-
        send_rules(f_out, &filter_list);
 
        if (f_out >= 0)