X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=osx_write.c;h=97a7ccf49ba74977718e335f15142306e11c2c91;hp=df10221feee218a8f8c5ebe012de724b9228b624;hb=a694ab16b6ff43b545ccd530360b7224433a5b76;hpb=38c06a3642348f26e9c687825e6fa6ec8a75729c diff --git a/osx_write.c b/osx_write.c index df10221f..97a7ccf4 100644 --- a/osx_write.c +++ b/osx_write.c @@ -11,9 +11,10 @@ * */ +#include #include #include -#include + #include "para.h" #include "fd.h" #include "string.h" @@ -24,10 +25,9 @@ #include "osx_write.cmdline.h" #include "error.h" - -#include +#include #include -#include +#include /** describes one input buffer for the osx writer */ struct osx_buffer { @@ -82,7 +82,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 +279,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;