From 85b98d08341ccd2abd2b0335465927e85eb20757 Mon Sep 17 00:00:00 2001 From: Hrvoje Niksic Date: Sat, 25 Aug 2012 16:03:34 +0200 Subject: [PATCH] Use hash_table_get instead of hash_table_get_pair. --- src/ChangeLog | 5 +++++ src/warc.c | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 214e3008..7830e944 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-08-25 Hrvoje Niksic + + * warc.c (warc_find_duplicate_cdx_record): Use hash_table_get + instead of hash_table_get_pair. + 2012-08-21 (tiny change) * connect.c (connect_to_ip) [ENABLE_IPV6]: Attempt to use IPv6. diff --git a/src/warc.c b/src/warc.c index 69f80beb..de99bf7c 100644 --- a/src/warc.c +++ b/src/warc.c @@ -1005,12 +1005,10 @@ warc_find_duplicate_cdx_record (char *url, char *sha1_digest_payload) if (warc_cdx_dedup_table == NULL) return NULL; - char *key; - struct warc_cdx_record *rec_existing; - int found = hash_table_get_pair (warc_cdx_dedup_table, sha1_digest_payload, - &key, &rec_existing); + struct warc_cdx_record *rec_existing + = hash_table_get (warc_cdx_dedup_table, sha1_digest_payload); - if (found && strcmp (rec_existing->url, url) == 0) + if (rec_existing && strcmp (rec_existing->url, url) == 0) return rec_existing; else return NULL; -- 2.39.2