]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util: there cannot be trailing garbage when parsing cpu sets
authorLennart Poettering <lennart@poettering.net>
Wed, 30 Sep 2015 18:19:57 +0000 (20:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 30 Sep 2015 20:26:16 +0000 (22:26 +0200)
extract_first() already skips trailing whitespace, hence no reason to
explicitly check for it.

src/basic/util.c

index a2a75bdd7f59a45d3865f5694fb00cb2afd0b310..cc50c9aa7d4f0188fc068521132f4f50582ead34 100644 (file)
@@ -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;
 }