summaryrefslogtreecommitdiff
path: root/exclude.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-03-22 12:21:41 -0700
committerWayne Davison <wayned@samba.org>2008-03-22 12:21:41 -0700
commit4a86fbcda0f4514d13a1a93fa553d47ce139299e (patch)
tree4b16776efb0a55359f96b4890f5cdb2db2ac62c3 /exclude.c
parentbc267e0f572591ec3e31f919d15041baa74bfae1 (diff)
downloadrsync-4a86fbcda0f4514d13a1a93fa553d47ce139299e.tar.gz
rsync-4a86fbcda0f4514d13a1a93fa553d47ce139299e.tar.bz2
rsync-4a86fbcda0f4514d13a1a93fa553d47ce139299e.zip
Change ex_len to pre_len in add_rule().
Diffstat (limited to 'exclude.c')
-rw-r--r--exclude.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/exclude.c b/exclude.c
index 422a824d..e796b2f5 100644
--- a/exclude.c
+++ b/exclude.c
@@ -119,7 +119,7 @@ static void add_rule(struct filter_list_struct *listp, const char *pat,
{
struct filter_struct *ret;
const char *cp;
- unsigned int ex_len;
+ unsigned int pre_len;
if (verbose > 2) {
rprintf(FINFO, "[%s] add_rule(%s%.*s%s)%s\n",
@@ -150,17 +150,17 @@ static void add_rule(struct filter_list_struct *listp, const char *pat,
|| (xflags & XFLG_ABS_IF_SLASH && strchr(pat, '/') != NULL))) {
mflags |= MATCHFLG_ABS_PATH;
if (*pat == '/')
- ex_len = dirbuf_len - module_dirlen - 1;
+ pre_len = dirbuf_len - module_dirlen - 1;
else
- ex_len = 0;
+ pre_len = 0;
} else
- ex_len = 0;
- if (!(ret->pattern = new_array(char, ex_len + pat_len + 1)))
+ pre_len = 0;
+ if (!(ret->pattern = new_array(char, pre_len + pat_len + 1)))
out_of_memory("add_rule");
- if (ex_len)
- memcpy(ret->pattern, dirbuf + module_dirlen, ex_len);
- strlcpy(ret->pattern + ex_len, pat, pat_len + 1);
- pat_len += ex_len;
+ if (pre_len)
+ memcpy(ret->pattern, dirbuf + module_dirlen, pre_len);
+ strlcpy(ret->pattern + pre_len, pat, pat_len + 1);
+ pat_len += pre_len;
if (strpbrk(ret->pattern, "*[?")) {
mflags |= MATCHFLG_WILD;