Use long instead of int when converting from TTL to seconds
Just to be really, really sure about embarrasing overflow settings Signed-off-by: Lars Hjemli <larsh@hal-2004.(none)>
This commit is contained in:
parent
a6a1112528
commit
f98e72684b
@ -25,7 +25,7 @@ static char *http_date(time_t t)
|
|||||||
tm->tm_hour, tm->tm_min, tm->tm_sec);
|
tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ttl_seconds(int ttl)
|
static long ttl_seconds(long ttl)
|
||||||
{
|
{
|
||||||
if (ttl<0)
|
if (ttl<0)
|
||||||
return 60 * 60 * 24 * 365;
|
return 60 * 60 * 24 * 365;
|
||||||
|
Loading…
Reference in New Issue
Block a user