summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-30 20:19:57 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-30 22:26:16 +0200
commite5aa2f71b74b69972a608cc00c9a59062529dd7d (patch)
treede0d69f02b2cd2981da628398a33fdccd8fdb01d /src/basic
parent765d143b5fc8dcb44f5fbd391ef36d0835793e7c (diff)
util: there cannot be trailing garbage when parsing cpu sets
extract_first() already skips trailing whitespace, hence no reason to explicitly check for it.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index a2a75bdd7f..cc50c9aa7d 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -2622,14 +2622,13 @@ int parse_cpu_set_and_warn(
CPU_SET_S(cpu, CPU_ALLOC_SIZE(ncpus), c);
}
- if (!isempty(rvalue))
- log_syntax(unit, LOG_ERR, filename, line, 0, "Trailing garbage, ignoring.");
/* On success, sets *cpu_set and returns ncpus for the system. */
if (c) {
*cpu_set = c;
c = NULL;
}
+
return (int) ncpus;
}