X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=osx_write.c;h=b0dfa89b17795007de8b3d85a8d63f7636bc5ecf;hp=cfd02e7453b1ccac04eb951e5f42009801806b55;hb=7d037b0b440e1913776650dbe35dbac6d5cfb5d5;hpb=75cf863ef7a7cf5fe346f098ffb07a472b8366ec diff --git a/osx_write.c b/osx_write.c index cfd02e74..b0dfa89b 100644 --- a/osx_write.c +++ b/osx_write.c @@ -279,19 +279,13 @@ e0: return ret; } -__malloc static void *osx_write_parse_config(const char *options) +__malloc static void *osx_write_parse_config_or_die(const char *options) { - struct osx_write_args_info *conf - = para_calloc(sizeof(struct osx_write_args_info)); - PARA_INFO_LOG("options: %s\n", options); - int ret = osx_cmdline_parser_string(options, conf, "osx_write"); - if (ret) - goto err_out; - return conf; -err_out: - free(conf); - return NULL; + struct osx_write_args_info *conf = para_calloc(sizeof(*conf)); + /* exits on errors */ + osx_cmdline_parser_string(options, conf, "osx_write"); + return conf; } static void osx_free_config(void *conf) @@ -377,7 +371,7 @@ void osx_write_init(struct writer *w) w->close = osx_write_close; w->pre_select = osx_write_pre_select; w->post_select = osx_write_post_select; - w->parse_config = osx_write_parse_config; + w->parse_config_or_die = osx_write_parse_config_or_die; w->free_config = osx_free_config; w->shutdown = NULL; /* nothing to do */ w->help = (struct ggo_help) {