1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Remove unnecessary casts to time_t. Insert the cast from -1 to time_t,

needed on systems with unsigned time_t.
This commit is contained in:
hniksic 2005-05-18 10:22:28 -07:00
parent cefb94c752
commit 1aca2ff28e
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2005-05-18 Hrvoje Niksic <hniksic@xemacs.org>
* cookies.c (update_cookie_field): Explicitly cast -1 to time_t to
cope with systems where time_t is unsigned.
* cookies.c: Remove unnecessary casts to time_t from values
already of that type.
2005-05-17 Hrvoje Niksic <hniksic@xemacs.org>
* ftp.c (ftp_loop_internal): Same here.

View File

@ -264,7 +264,7 @@ store_cookie (struct cookie_jar *jar, struct cookie *cookie)
#ifdef ENABLE_DEBUG
if (opt.debug)
{
time_t exptime = (time_t) cookie->expiry_time;
time_t exptime = cookie->expiry_time;
DEBUGP (("\nStored cookie %s %d%s %s <%s> <%s> [expiry %s] %s %s\n",
cookie->domain, cookie->port,
cookie->port == PORT_ANY ? " (ANY)" : "",
@ -394,10 +394,10 @@ update_cookie_field (struct cookie *cookie,
BOUNDED_TO_ALLOCA (value_b, value_e, value_copy);
expires = http_atotm (value_copy);
if (expires != -1)
if (expires != (time_t) -1)
{
cookie->permanent = 1;
cookie->expiry_time = (time_t)expires;
cookie->expiry_time = expires;
}
else
/* Error in expiration spec. Assume default (cookie doesn't