{
struct afh_recv_args_info *tmp = para_calloc(sizeof(*tmp));
- if (!afh_recv_cmdline_parser(argc, argv, tmp))
- return tmp;
- free(tmp);
- return NULL;
+ afh_recv_cmdline_parser(argc, argv, tmp);
+ return tmp;
}
static void afh_recv_free_config(void *conf)
*/
int main(int argc, char *argv[])
{
- int ret = -E_AUDIOC_SYNTAX, fd;
+ int ret, fd;
char *cf, *buf = NULL, *args = NULL;
size_t bufsize;
- if (audioc_cmdline_parser(argc, argv, &conf))
- goto out;
+ audioc_cmdline_parser(argc, argv, &conf);
HANDLE_VERSION_FLAG("audioc", conf);
cf = configfile_exists();
if (cf) {
.print_errors = 1,
};
- ret = audioc_cmdline_parser_config_file(cf, &conf, ¶ms);
+ audioc_cmdline_parser_config_file(cf, &conf, ¶ms);
free(cf);
- if (ret) {
- fprintf(stderr, "parse error in config file\n");
- exit(EXIT_FAILURE);
- }
}
loglevel = get_loglevel_by_name(conf.loglevel_arg);
if (conf.socket_given)
};
valid_fd_012();
- if (audiod_cmdline_parser_ext(argc, argv, &conf, ¶ms))
- exit(EXIT_FAILURE);
+ audiod_cmdline_parser_ext(argc, argv, &conf, ¶ms);
HANDLE_VERSION_FLAG("audiod", conf);
/* init receivers/filters/writers early to make help work */
recv_init();
{
struct dccp_recv_args_info *tmp = para_calloc(sizeof(*tmp));
- if (!dccp_recv_cmdline_parser(argc, argv, tmp) &&
- dccp_recv_ccid_support_check(tmp))
- return tmp;
- free(tmp);
- return NULL;
+ dccp_recv_cmdline_parser(argc, argv, tmp);
+ if (!dccp_recv_ccid_support_check(tmp))
+ exit(EXIT_FAILURE);
+ return tmp;
}
static void dccp_recv_pre_select(struct sched *s, struct task *t)
struct mixer *m;
struct mixer_handle *h = NULL;
- if (fade_cmdline_parser(argc, argv, &conf))
- exit(EXIT_FAILURE);
+ fade_cmdline_parser(argc, argv, &conf);
HANDLE_VERSION_FLAG("fade", conf);
ret = configfile_exists();
if (!ret && conf.config_file_given) {
static char *cf; /* config file */
struct stat statbuf;
- if (filter_cmdline_parser(argc, argv, &conf))
- return -E_FILTER_SYNTAX;
+ filter_cmdline_parser(argc, argv, &conf);
HANDLE_VERSION_FLAG("filter", conf);
if (conf.help_given || conf.detailed_help_given)
print_help_and_die();
.check_ambiguity = 0,
.print_errors = 1
};
- if (filter_cmdline_parser_config_file(cf, &conf, ¶ms))
- return -E_FILTER_SYNTAX;
+ filter_cmdline_parser_config_file(cf, &conf, ¶ms);
}
if (!conf.filter_given)
return -E_NO_FILTERS;
}
PARA_INFO_LOG("rereading command line options and config file");
gui_cmdline_parser_ext(_argc, _argv, &conf, ¶ms);
- if (gui_cmdline_parser_config_file(cf, &conf, ¶ms) != 0) {
- PARA_EMERG_LOG("errors in config file");
- finish(EXIT_FAILURE);
- }
+ gui_cmdline_parser_config_file(cf, &conf, ¶ms);
PARA_NOTICE_LOG("config file reloaded");
if (check_key_map_args() < 0)
finish(EXIT_FAILURE);
.check_ambiguity = 0,
.print_errors = 1,
};
- if (gui_cmdline_parser_config_file(cf, &conf, ¶ms) != 0)
- exit(EXIT_FAILURE);
+ gui_cmdline_parser_config_file(cf, &conf, ¶ms);
}
loglevel = get_loglevel_by_name(conf.loglevel_arg);
if (check_key_map_args() < 0) {
{
struct http_recv_args_info *tmp = para_calloc(sizeof(*tmp));
- if (!http_recv_cmdline_parser(argc, argv, tmp))
- return tmp;
- free(tmp);
- return NULL;
+ http_recv_cmdline_parser(argc, argv, tmp);
+ return tmp;
}
static int http_recv_open(struct receiver_node *rn)
.print_errors = 1
};
- if (play_cmdline_parser_ext(argc, argv, &conf, ¶ms))
- exit(EXIT_FAILURE);
+ play_cmdline_parser_ext(argc, argv, &conf, ¶ms);
HANDLE_VERSION_FLAG("play", conf);
if (conf.help_given || conf.detailed_help_given)
print_help_and_die();
static void *parse_config(int argc, char *argv[], int *receiver_num)
{
- if (recv_cmdline_parser(argc, argv, &conf))
- return NULL;
+ recv_cmdline_parser(argc, argv, &conf);
HANDLE_VERSION_FLAG("recv", conf);
if (conf.help_given || conf.detailed_help_given)
print_help_and_die();
static void *udp_recv_parse_config(int argc, char **argv)
{
- int ret;
- struct udp_recv_args_info *tmp =
- para_calloc(sizeof(struct udp_recv_args_info));
-
- ret = udp_recv_cmdline_parser(argc, argv, tmp)? -E_UDP_SYNTAX : 1;
- if (ret >= 0)
- return tmp;
- free(tmp);
- return NULL;
+ struct udp_recv_args_info *tmp = para_calloc(sizeof(*tmp));
+ udp_recv_cmdline_parser(argc, argv, tmp);
+ return tmp;
}
/*