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

Remove defensive assert in cookies.c

This commit is contained in:
Darshit Shah 2014-11-22 14:10:16 +05:30
parent 1b8e54b808
commit ed996fe32f
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-11-22 Darshit Shah <darnir@gmail.com>
* cookies.c (discard_matching_cookie): Replace defensive assert with a
logical check and error message
2014-11-22 Darshit Shah <darnir@gmail.com> 2014-11-22 Darshit Shah <darnir@gmail.com>
* wget.h: Make extern declaration for program_argstring. * wget.h: Make extern declaration for program_argstring.

View File

@ -304,7 +304,12 @@ discard_matching_cookie (struct cookie_jar *jar, struct cookie *cookie)
res = hash_table_get_pair (jar->chains, victim->domain, res = hash_table_get_pair (jar->chains, victim->domain,
&chain_key, NULL); &chain_key, NULL);
assert (res != 0);
if (res == 0)
{
logprintf (LOG_VERBOSE, _("Unable to get cookie for %s\n"),
victim->domain);
}
if (!victim->next) if (!victim->next)
{ {
/* VICTIM was the only cookie in the chain. Destroy the /* VICTIM was the only cookie in the chain. Destroy the