X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/ea2111d10a10a164334eff3b621ed7e630404345..c95da96a0c51c66c8cb2eff97b768a717d9e0c79:/exclude.c diff --git a/exclude.c b/exclude.c index ab01234c..d25adb34 100644 --- a/exclude.c +++ b/exclude.c @@ -146,11 +146,7 @@ void add_exclude_list(char *pattern,struct exclude_struct ***list, int include) return; } - if (!*list) { - *list = (struct exclude_struct **)malloc(sizeof(struct exclude_struct *)*2); - } else { - *list = (struct exclude_struct **)realloc(*list,sizeof(struct exclude_struct *)*(len+2)); - } + *list = (struct exclude_struct **)Realloc(*list,sizeof(struct exclude_struct *)*(len+2)); if (!*list || !((*list)[len] = make_exclude(pattern, include))) out_of_memory("add_exclude");