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;