cmdparse: remove CPS_Status

Remove command and option specific error codes. Return zero on any
failure.
This commit is contained in:
Miroslav Lichvar
2016-06-27 13:38:55 +02:00
parent d78e8f096c
commit f8bd9ab378
4 changed files with 26 additions and 121 deletions

8
conf.c
View File

@@ -604,17 +604,13 @@ parse_null(char *line)
static void
parse_source(char *line, NTP_Source_Type type, int pool)
{
CPS_Status status;
NTP_Source source;
char str[64];
source.type = type;
source.pool = pool;
status = CPS_ParseNTPSourceAdd(line, &source.params);
if (status != CPS_Success) {
CPS_StatusToString(status, str, sizeof (str));
other_parse_error(str);
if (!CPS_ParseNTPSourceAdd(line, &source.params)) {
command_parse_error();
return;
}