X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=sync_filter.c;h=d322395df87fdc556332ca642ea1d54e9bcc2bd9;hb=27c08870ba172782f6406045007b6ff32a4f7329;hp=8e9ff2c5de79a6385b6472453f3dec417b9ac5cc;hpb=27e8c0dca96754834fcc358cfbab548e0be69eb6;p=paraslash.git diff --git a/sync_filter.c b/sync_filter.c index 8e9ff2c5..d322395d 100644 --- a/sync_filter.c +++ b/sync_filter.c @@ -102,7 +102,7 @@ static void sync_open(struct filter_node *fn) unsigned buddy_given; const struct lls_opt_result *r_b; - ctx = fn->private_data = para_calloc(sizeof(*ctx)); + ctx = fn->private_data = zalloc(sizeof(*ctx)); init_list_head(&ctx->buddies); /* create socket to listen for incoming packets */ @@ -148,7 +148,7 @@ static void sync_open(struct filter_node *fn) close(fd); goto fail; } - buddy = para_malloc(sizeof(*buddy)); + buddy = alloc(sizeof(*buddy)); buddy->fd = fd; buddy->sbi = sbi + i; buddy->ping_received = false; @@ -176,12 +176,12 @@ static void *sync_setup(const struct lls_parse_result *lpr) r_b = FILTER_CMD_OPT_RESULT(SYNC, BUDDY, lpr); n = lls_opt_given(r_b); - sbi = para_malloc(n * sizeof(*sbi)); + sbi = arr_alloc(n, sizeof(*sbi)); PARA_INFO_LOG("initializing buddy info array of length %u\n", n); for (i = 0; i < n; i++) { const char *url = lls_string_val(i, r_b); size_t len = strlen(url); - char *host = para_malloc(len + 1); + char *host = alloc(len + 1); int port; struct addrinfo *ai;