X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fwarc.c;h=92a49ef8a4ec98eef2bba955e8f4007212ca2462;hp=24751dbf90d028471477aad0feb5af92f645b31d;hb=1d14c18d7f81c03fdf79358055ed909c6d65caa1;hpb=ee9d4a905769c7bdfad94947c48aaada329fc9de diff --git a/src/warc.c b/src/warc.c index 24751dbf..92a49ef8 100644 --- a/src/warc.c +++ b/src/warc.c @@ -1001,10 +1001,10 @@ warc_find_duplicate_cdx_record (char *url, char *sha1_digest_payload) char *key; struct warc_cdx_record *rec_existing; - hash_table_get_pair (warc_cdx_dedup_table, sha1_digest_payload, &key, - &rec_existing); + int found = hash_table_get_pair (warc_cdx_dedup_table, sha1_digest_payload, + &key, &rec_existing); - if (rec_existing != NULL && strcmp (rec_existing->url, url) == 0) + if (found && strcmp (rec_existing->url, url) == 0) return rec_existing; else return NULL;