summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-05-06 17:22:59 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-05-06 17:22:59 +0100
commit6c0b6f831fe4de450b4e89a942177829733e10b5 (patch)
treef20a14c273fdb5b20307eacf2057c4416138cab3
parent9bdbe6e64d12c514888457d466f625524627af19 (diff)
downloadlibdom-master.tar.gz
libdom-master.tar.bz2
Assert instead of checkingHEADmaster
At this point, we MUST have an element created, so assert it rather than half-heartedly checking. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r--bindings/hubbub/parser.c5
1 files changed, 4 insertions, 1 deletions
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)