1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 03:25:31 +03:00

shared: "max" in the string->number conversion is meant to be inclusive

This commit is contained in:
Michal Schmidt 2012-10-30 15:45:50 +01:00
parent f8b69d1dfc
commit 8511dd1871

View File

@ -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; \
} \