]> sjero.net Git - wget/commitdiff
Use hash_table_get instead of hash_table_get_pair.
authorHrvoje Niksic <hniksic@gmail.com>
Sat, 25 Aug 2012 14:03:34 +0000 (16:03 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 26 Aug 2012 09:48:07 +0000 (11:48 +0200)
src/ChangeLog
src/warc.c

index 214e3008d5bc5b106d62e6d4c473c7e9685d6c76..7830e944119896437567971441322f7f5a37543c 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-25  Hrvoje Niksic  <hniksic@gmail.com>
+
+       * warc.c (warc_find_duplicate_cdx_record): Use hash_table_get
+       instead of hash_table_get_pair.
+
 2012-08-21  <y-iida@secom.co.jp> (tiny change)
 
        * connect.c (connect_to_ip) [ENABLE_IPV6]: Attempt to use IPv6.
index 69f80bebc62889edbf60c03bf60cddc2d6df50d5..de99bf7cbf9a76e2e0df5cfb70a216897e3cc8ae 100644 (file)
@@ -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;