Gitweb links:

...log 
http://git.netsurf-browser.org/libdom.git/shortlog/6c0b6f831fe4de450b4e89a942177829733e10b5
...commit 
http://git.netsurf-browser.org/libdom.git/commit/6c0b6f831fe4de450b4e89a942177829733e10b5
...tree 
http://git.netsurf-browser.org/libdom.git/tree/6c0b6f831fe4de450b4e89a942177829733e10b5

The branch, master has been updated
       via  6c0b6f831fe4de450b4e89a942177829733e10b5 (commit)
      from  9bdbe6e64d12c514888457d466f625524627af19 (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/libdom.git/commit/?id=6c0b6f831fe4de450b4e89a942177829733e10b5
commit 6c0b6f831fe4de450b4e89a942177829733e10b5
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    Assert instead of checking
    
    At this point, we MUST have an element created, so assert it
    rather than half-heartedly checking.
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/bindings/hubbub/parser.c b/bindings/hubbub/parser.c
index 6ee3004..1c0e03f 100644
--- a/bindings/hubbub/parser.c
+++ b/bindings/hubbub/parser.c
@@ -219,7 +219,10 @@ static hubbub_error create_element(void *parser, const 
hubbub_tag *tag,
                }
        }
 
-       if (element != NULL && tag->n_attributes > 0) {
+       /* By now, we MUST have constructed an element */
+       assert(element != NULL);
+
+       if (tag->n_attributes > 0) {
                herr = add_attributes(parser, element, tag->attributes,
                                tag->n_attributes);
                if (herr != HUBBUB_OK)


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

Summary of changes:
 bindings/hubbub/parser.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bindings/hubbub/parser.c b/bindings/hubbub/parser.c
index 6ee3004..1c0e03f 100644
--- a/bindings/hubbub/parser.c
+++ b/bindings/hubbub/parser.c
@@ -219,7 +219,10 @@ static hubbub_error create_element(void *parser, const 
hubbub_tag *tag,
                }
        }
 
-       if (element != NULL && tag->n_attributes > 0) {
+       /* By now, we MUST have constructed an element */
+       assert(element != NULL);
+
+       if (tag->n_attributes > 0) {
                herr = add_attributes(parser, element, tag->attributes,
                                tag->n_attributes);
                if (herr != HUBBUB_OK)


-- 
Document Object Model library

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

Reply via email to