author | Lars Hjemli <larsh@hal-2004.(none)> | 2007-01-05 17:20:23 (UTC) |
---|---|---|
committer | Lars Hjemli <larsh@hal-2004.(none)> | 2007-01-05 17:20:23 (UTC) |
commit | f98e72684bddb5f746f1d4edf663c70076105c9d (patch) (side-by-side diff) | |
tree | 0c67f32f454cf9725b2c9b91083d4dc261f0538c | |
parent | a6a11125283cd159bbd22e4e3c619bccad1162df (diff) | |
download | cgit-f98e72684bddb5f746f1d4edf663c70076105c9d.zip cgit-f98e72684bddb5f746f1d4edf663c70076105c9d.tar.gz cgit-f98e72684bddb5f746f1d4edf663c70076105c9d.tar.bz2 |
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)>
-rw-r--r-- | ui-shared.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-shared.c b/ui-shared.c index b9c1243..bebd3e0 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -20,17 +20,17 @@ static char *http_date(time_t t) {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Now", "Dec"}; struct tm *tm = gmtime(&t); return fmt("%s, %02d %s %04d %02d:%02d:%02d GMT", day[tm->tm_wday], tm->tm_mday, month[tm->tm_mon], 1900+tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec); } -static int ttl_seconds(int ttl) +static long ttl_seconds(long ttl) { if (ttl<0) return 60 * 60 * 24 * 365; else return ttl * 60; } void cgit_print_error(char *msg) |