From: Michal Schmidt Date: Tue, 30 Oct 2012 14:45:50 +0000 (+0100) Subject: shared: "max" in the string->number conversion is meant to be inclusive X-Git-Tag: v196~164 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=8511dd1871fdea1ba0c63baa5becf0ede1658007;p=elogind.git shared: "max" in the string->number conversion is meant to be inclusive --- diff --git a/src/shared/util.h b/src/shared/util.h index ca80bfe2e..284035c33 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -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; \ } \