X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/b58bfb2f20afc8fb19bc26d307143dacf7b809db..d2f6e192623989eac4015582e1e20f61499cc782:/exclude.c diff --git a/exclude.c b/exclude.c index f1c4fdf2..bcad88e0 100644 --- a/exclude.c +++ b/exclude.c @@ -4,7 +4,7 @@ * Copyright (C) 1996-2001 Andrew Tridgell * Copyright (C) 1996 Paul Mackerras * Copyright (C) 2002 Martin Pool - * Copyright (C) 2003-2007 Wayne Davison + * Copyright (C) 2003-2008 Wayne Davison * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,7 +26,6 @@ extern int verbose; extern int am_server; extern int am_sender; extern int eol_nulls; -extern int recurse; extern int io_error; extern int local_server; extern int prune_empty_dirs; @@ -296,7 +295,7 @@ static char *parse_merge_name(const char *merge_file, unsigned int *len_ptr, strlcpy(to, merge_file, *len_ptr + 1); merge_file = to; } - if (!sanitize_path(fn, merge_file, r, dirbuf_depth, NULL)) { + if (!sanitize_path(fn, merge_file, r, dirbuf_depth)) { rprintf(FERROR, "merge-file name overflows: %s\n", merge_file); return NULL; @@ -518,13 +517,13 @@ void change_local_filter_dir(const char *dname, int dlen, int dir_depth) filt_array[cur_depth] = push_local_filters(dname, dlen); } -static int rule_matches(char *fname, struct filter_struct *ex, int name_is_dir) +static int rule_matches(const char *fname, struct filter_struct *ex, int name_is_dir) { int slash_handling, str_cnt = 0, anchored_match = 0; int ret_match = ex->match_flags & MATCHFLG_NEGATE ? 0 : 1; char *p, *pattern = ex->pattern; const char *strings[16]; /* more than enough */ - char *name = fname + (*fname == '/'); + const char *name = fname + (*fname == '/'); if (!*name) return 0; @@ -621,7 +620,7 @@ static void report_filter_result(char const *name, * Return -1 if file "name" is defined to be excluded by the specified * exclude list, 1 if it is included, and 0 if it was not matched. */ -int check_filter(struct filter_list_struct *listp, char *name, int name_is_dir) +int check_filter(struct filter_list_struct *listp, const char *name, int name_is_dir) { struct filter_struct *ent;