diff options
Diffstat (limited to 'daemon/bindings')
-rw-r--r-- | daemon/bindings/cache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/daemon/bindings/cache.c b/daemon/bindings/cache.c index 3b14ed82..d3815175 100644 --- a/daemon/bindings/cache.c +++ b/daemon/bindings/cache.c @@ -130,10 +130,10 @@ static int cache_max_ttl(lua_State *L) lua_error_p(L, "expected 'max_ttl(number ttl)'"); uint32_t min = cache->ttl_min; int64_t ttl = lua_tointeger(L, 1); - if (ttl < 1 || ttl < min || ttl > UINT32_MAX) { + if (ttl < 1 || ttl < min || ttl > TTL_MAX_MAX) { lua_error_p(L, "max_ttl must be larger than minimum TTL, and in range <1, " - STR(UINT32_MAX) ">'"); + STR(TTL_MAX_MAX) ">'"); } cache->ttl_max = ttl; } @@ -152,10 +152,10 @@ static int cache_min_ttl(lua_State *L) lua_error_p(L, "expected 'min_ttl(number ttl)'"); uint32_t max = cache->ttl_max; int64_t ttl = lua_tointeger(L, 1); - if (ttl < 0 || ttl > max || ttl > UINT32_MAX) { + if (ttl < 0 || ttl > max || ttl > TTL_MAX_MAX) { lua_error_p(L, "min_ttl must be smaller than maximum TTL, and in range <0, " - STR(UINT32_MAX) ">'"); + STR(TTL_MAX_MAX) ">'"); } cache->ttl_min = ttl; } |