Gitweb links:

...log 
http://git.netsurf-browser.org/libcss.git/shortlog/1fb312312cdd01b3cf59950eacc7762f01c41a50
...commit 
http://git.netsurf-browser.org/libcss.git/commit/1fb312312cdd01b3cf59950eacc7762f01c41a50
...tree 
http://git.netsurf-browser.org/libcss.git/tree/1fb312312cdd01b3cf59950eacc7762f01c41a50

The branch, master has been updated
       via  1fb312312cdd01b3cf59950eacc7762f01c41a50 (commit)
      from  ba1d79992750773e3decdf485b40b283d81837a9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/libcss.git/commit/?id=1fb312312cdd01b3cf59950eacc7762f01c41a50
commit 1fb312312cdd01b3cf59950eacc7762f01c41a50
Author: Michael Drake <Michael Drake [email protected]>
Commit: Michael Drake <Michael Drake [email protected]>

    Select hash: Simplify insertion at start of non-empty list.
    
    This might help Coverity understand what's going on.

diff --git a/src/select/hash.c b/src/select/hash.c
index 92457d8..4b11702 100644
--- a/src/select/hash.c
+++ b/src/select/hash.c
@@ -815,24 +815,23 @@ css_error _insert_into_chain(css_selector_hash *ctx, 
hash_entry *head,
                        search = search->next;
                } while (search != NULL);
 
-               entry->sel = selector;
-               _chain_bloom_generate(selector, entry->sel_chain_bloom);
-
-#ifdef PRINT_CHAIN_BLOOM_DETAILS
-               print_chain_bloom_details(entry->sel_chain_bloom);
-#endif
-
                if (prev == NULL) {
-                       hash_entry temp;
-                       entry->next = entry;
-                       temp = *entry;
                        *entry = *head;
-                       *head = temp;
+                       head->next = entry;
+
+                       entry = head;
                } else {
                        entry->next = prev->next;
                        prev->next = entry;
                }
 
+               entry->sel = selector;
+               _chain_bloom_generate(selector, entry->sel_chain_bloom);
+
+#ifdef PRINT_CHAIN_BLOOM_DETAILS
+               print_chain_bloom_details(entry->sel_chain_bloom);
+#endif
+
                ctx->hash_size += sizeof(hash_entry);
        }
 


-----------------------------------------------------------------------

Summary of changes:
 src/select/hash.c |   21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/select/hash.c b/src/select/hash.c
index 92457d8..4b11702 100644
--- a/src/select/hash.c
+++ b/src/select/hash.c
@@ -815,24 +815,23 @@ css_error _insert_into_chain(css_selector_hash *ctx, 
hash_entry *head,
                        search = search->next;
                } while (search != NULL);
 
-               entry->sel = selector;
-               _chain_bloom_generate(selector, entry->sel_chain_bloom);
-
-#ifdef PRINT_CHAIN_BLOOM_DETAILS
-               print_chain_bloom_details(entry->sel_chain_bloom);
-#endif
-
                if (prev == NULL) {
-                       hash_entry temp;
-                       entry->next = entry;
-                       temp = *entry;
                        *entry = *head;
-                       *head = temp;
+                       head->next = entry;
+
+                       entry = head;
                } else {
                        entry->next = prev->next;
                        prev->next = entry;
                }
 
+               entry->sel = selector;
+               _chain_bloom_generate(selector, entry->sel_chain_bloom);
+
+#ifdef PRINT_CHAIN_BLOOM_DETAILS
+               print_chain_bloom_details(entry->sel_chain_bloom);
+#endif
+
                ctx->hash_size += sizeof(hash_entry);
        }
 


-- 
Cascading Style Sheets library

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to