]> git.tuebingen.mpg.de Git - paraslash.git/commit
write_common: Make check_writer_arg() exit on syntax errors.
authorAndre Noll <maan@systemlinux.org>
Sat, 6 Aug 2011 20:32:49 +0000 (22:32 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 13 Aug 2011 11:01:30 +0000 (13:01 +0200)
commiteb992f2fc3ff5b6bd1c0b91d473b07675fe5b927
treebb2f5a20cf9b7a18db36675b1dda2fc0657eb79b
parent37dcd255ceb88c02cab500069956f4589c9d13e7
write_common: Make check_writer_arg() exit on syntax errors.

This function parses the argument of the --writer option to extract
the name of the writer, which is the first word of the argument. If
this word is not the name of a supported writer, the function
returns NULL to indicate that the given writer does not exist.
Otherwise check_writer_arg() calls the ->parse_config_or_die method
of this writer which parses the remaining part of the argument and
exits on errors.

It is more consistent and simpler to let this function exit also
in case the writer was not found. This simplifies the callers a bit
since they do not have to check the return value any more. It also
allows to kill E_WRITE_COMMON_SYNTAX.
audiod.c
error.h
write.c
write_common.c
write_common.h