X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=osx_write.c;h=c40428895ece1e8376cd6e58b83a2369eba53fa4;hp=df10221feee218a8f8c5ebe012de724b9228b624;hb=4f84d0d39420295236578d27daf0f6c326858924;hpb=85663a14da08f4f8782d29a3b0c51de5cd0817b1 diff --git a/osx_write.c b/osx_write.c index df10221f..c4042889 100644 --- a/osx_write.c +++ b/osx_write.c @@ -13,7 +13,7 @@ #include #include -#include + #include "para.h" #include "fd.h" #include "string.h" @@ -24,10 +24,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 +81,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 +278,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;