X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=sideband.c;h=d4876234a192a956f112c48f871ed1fb0d5321b7;hb=ac9cc8f21ddeb821134e657f509bb83cec8c1da4;hp=3862d7ac0a0a1aaa21ffe255ec8bd53c2508aeb0;hpb=4d9d588c5df359c3c5f279fbfd4ea51d3a2afc87;p=paraslash.git diff --git a/sideband.c b/sideband.c index 3862d7ac..d4876234 100644 --- a/sideband.c +++ b/sideband.c @@ -1,13 +1,8 @@ -/* - * Copyright (C) 2012-2014 Andre Noll - * - * Licensed under the GPL v2. For licencing details see COPYING. - */ +/* Copyright (C) 2012 Andre Noll , see file COPYING. */ /** \file sideband.c Implementation of the sideband API. */ #include -#include #include "para.h" #include "error.h" @@ -42,7 +37,7 @@ struct sb_context { struct sb_context *sb_new_recv(size_t max_size, sb_transformation t, void *trafo_context) { - struct sb_context *c = para_calloc(sizeof(*c)); + struct sb_context *c = zalloc(sizeof(*c)); c->max_size = max_size; c->trafo = t; @@ -67,7 +62,7 @@ struct sb_context *sb_new_recv(size_t max_size, sb_transformation t, struct sb_context *sb_new_send(struct sb_buffer *sbb, bool dont_free, sb_transformation t, void *trafo_context) { - struct sb_context *c = para_calloc(sizeof(*c)); + struct sb_context *c = zalloc(sizeof(*c)); struct iovec src, dst, *srcp, *dstp; assert(sbb); @@ -271,7 +266,7 @@ int sb_received(struct sb_context *c, size_t nbytes, struct sb_buffer *result) */ if (sbb->iov.iov_len == (size_t)-1) return -E_SB_PACKET_SIZE; - sbb->iov.iov_base = para_malloc(sbb->iov.iov_len + 1); + sbb->iov.iov_base = alloc(sbb->iov.iov_len + 1); return 0; /* ready to read body */ success: *result = c->sbb;