use Realloc instead of realloc
[rsync/rsync.git] / rsync.c
diff --git a/rsync.c b/rsync.c
index f41029b..b61128b 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -638,11 +638,7 @@ static void add_delete_entry(struct file_struct *file)
 {
        if (dlist_len == dlist_alloc_len) {
                dlist_alloc_len += 1024;
-               if (!delete_list) {
-                       delete_list = (struct delete_list *)malloc(sizeof(delete_list[0])*dlist_alloc_len);
-               } else {
-                       delete_list = (struct delete_list *)realloc(delete_list, sizeof(delete_list[0])*dlist_alloc_len);
-               }
+               delete_list = (struct delete_list *)Realloc(delete_list, sizeof(delete_list[0])*dlist_alloc_len);
                if (!delete_list) out_of_memory("add_delete_entry");
        }