mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
core: skip whitespace after "|" and "!" in the condition parser
We'd skip any whitespace immediately after "=", but then we'd treat whitespace that is between "|" or "!" and the value as significant. This is rather confusing, let's ignore it too.
This commit is contained in:
parent
e3b52014e2
commit
9266f31e61
@ -2587,13 +2587,13 @@ int config_parse_unit_condition_string(
|
||||
return 0;
|
||||
}
|
||||
|
||||
trigger = rvalue[0] == '|';
|
||||
trigger = *rvalue == '|';
|
||||
if (trigger)
|
||||
rvalue++;
|
||||
rvalue += 1 + strspn(rvalue + 1, WHITESPACE);
|
||||
|
||||
negate = rvalue[0] == '!';
|
||||
negate = *rvalue == '!';
|
||||
if (negate)
|
||||
rvalue++;
|
||||
rvalue += 1 + strspn(rvalue + 1, WHITESPACE);
|
||||
|
||||
r = unit_full_printf(u, rvalue, &s);
|
||||
if (r < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user