network: allow empty assignment to PreferredLifetime=
Users might want to use that to unset a previous setting. The docs seem OK as they are: we don't need to explictly mention the empty value, since it is almost always allowed.
This commit is contained in:
parent
d273579667
commit
10b20e5a93
|
@ -967,8 +967,8 @@ int config_parse_lifetime(const char *unit,
|
|||
if (r < 0)
|
||||
return r;
|
||||
|
||||
/* We accept only "forever", "infinity", or "0". */
|
||||
if (STR_IN_SET(rvalue, "forever", "infinity"))
|
||||
/* We accept only "forever", "infinity", empty, or "0". */
|
||||
if (STR_IN_SET(rvalue, "forever", "infinity", ""))
|
||||
k = CACHE_INFO_INFINITY_LIFE_TIME;
|
||||
else if (streq(rvalue, "0"))
|
||||
k = 0;
|
||||
|
|
Loading…
Reference in New Issue