Public functions should always return a proper error code on
failure. Returning -1 is asking for trouble.
PARA_ERROR(SIZE_PREFIX, "bad size prefix"), \
PARA_ERROR(REGEX, "regular expression error"), \
PARA_ERROR(ARG_NOT_FOUND, "argument not found in arg vector"), \
+ PARA_ERROR(BAD_LL, "invalid loglevel"), \
#define EXEC_ERRORS \
return LL_CRIT;
if (loglevel_equal(txt, "emerg"))
return LL_EMERG;
- return -1;
+ return -E_BAD_LL;
}
static int get_next_word(const char *buf, const char *delim, char **word)