X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=osx_write.c;h=bc11e61aea24a22596c88a3e4e14f5d7b9ad746c;hp=df10221feee218a8f8c5ebe012de724b9228b624;hb=05527588bd503e4748d801b641a9e3a6556525ad;hpb=38c06a3642348f26e9c687825e6fa6ec8a75729c diff --git a/osx_write.c b/osx_write.c index df10221f..bc11e61a 100644 --- a/osx_write.c +++ b/osx_write.c @@ -11,9 +11,11 @@ * */ +#include #include #include #include + #include "para.h" #include "fd.h" #include "string.h" @@ -82,7 +84,7 @@ static void init_buffers(struct writer_node *wn) ptrptr = &powd->to; for (i = 0; i < conf->numbuffers_arg; i++) { - *ptrptr = malloc(sizeof(struct osx_buffer)); + *ptrptr = para_malloc(sizeof(struct osx_buffer)); (*ptrptr)->size = 0; (*ptrptr)->remaining = 0; (*ptrptr)->buffer = NULL; @@ -279,7 +281,7 @@ static int osx_write_post_select(__a_unused struct sched *s, { struct private_osx_write_data *powd = wn->private_data; struct writer_node_group *wng = wn->wng; - short *data = (short*)wng->buf; + short *data = (short*)*wng->bufp; if (!need_new_buffer(wn)) return 1;