diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2015-11-04 00:32:34 +0300 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2015-11-04 00:41:18 +0300 |
commit | 0293a7a8302d73806a04ecfe915e1aeeacdefd6f (patch) | |
tree | 7e61144e8a426c94ef9d632bc4545edabeec825c /src/core | |
parent | 5604b971cf16bd936570d7496c01ce0bd8348632 (diff) |
core: small fixes to parse_namespace
* don't hide ENOMEM
* log r instead of 0
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/load-fragment.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index a30cd0967d..5949749374 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -3232,12 +3232,14 @@ int config_parse_namespace_path_strv( int offset; r = extract_first_word(&cur, &word, NULL, EXTRACT_QUOTES); + if (r == 0) + break; + if (r == -ENOMEM) + return log_oom(); if (r < 0) { - log_syntax(unit, LOG_ERR, filename, line, 0, "Trailing garbage, ignoring: %s", prev); + log_syntax(unit, LOG_ERR, filename, line, r, "Trailing garbage, ignoring: %s", prev); return 0; } - if (r == 0) - break; if (!utf8_is_valid(word)) { log_syntax_invalid_utf8(unit, LOG_ERR, filename, line, word); |