mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-13 13:17:43 +03:00
shared: "max" in the string->number conversion is meant to be inclusive
This commit is contained in:
parent
f8b69d1dfc
commit
8511dd1871
@ -339,7 +339,7 @@ unsigned long long random_ull(void);
|
||||
if (name##_table[i] && \
|
||||
streq(name##_table[i], s)) \
|
||||
return i; \
|
||||
if (safe_atou(s, &u) >= 0 && u < max) \
|
||||
if (safe_atou(s, &u) >= 0 && u <= max) \
|
||||
return (type) u; \
|
||||
return (type) -1; \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user