From 70da04d69e87e6d11fc043dc769de2b5e027f071 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 25 May 2008 22:31:42 +0000 Subject: Simplify code using xmlDocGetRootElement(). svn path=/trunk/netsurf/; revision=4201 --- render/html.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/render/html.c b/render/html.c index 2bd1437c9..59cbde11f 100644 --- a/render/html.c +++ b/render/html.c @@ -427,10 +427,7 @@ bool html_convert(struct content *c, int width, int height) } /* locate html and head elements */ - for (html = document->children; - html != 0 && html->type != XML_ELEMENT_NODE; - html = html->next) - ; + html = xmlDocGetRootElement(document); if (html == 0 || strcmp((const char *) html->name, "html") != 0) { LOG(("html element not found")); xmlFreeDoc(document); -- cgit v1.2.3