diff options
author | John Tytgat <joty@netsurf-browser.org> | 2004-08-14 14:30:12 +0000 |
---|---|---|
committer | John Tytgat <joty@netsurf-browser.org> | 2004-08-14 14:30:12 +0000 |
commit | 402c4ca66c7d95b1cdfc9eefbcb94947c807155b (patch) | |
tree | dbc42a5d9357d6c03d6c479bf6792754116f8adb /desktop | |
parent | 7d3a242132eedadbcb96bead6dbed64729d11aaf (diff) | |
download | netsurf-402c4ca66c7d95b1cdfc9eefbcb94947c807155b.tar.gz netsurf-402c4ca66c7d95b1cdfc9eefbcb94947c807155b.tar.bz2 |
[project @ 2004-08-14 14:30:10 by joty]
Removed a chunk of Norcroft compiler warnings. Re-ident some pieces.
svn path=/import/netsurf/; revision=1231
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/browser.c | 2 | ||||
-rw-r--r-- | desktop/imagemap.c | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index 65ba0b050..fac897822 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -605,7 +605,7 @@ void browser_window_mouse_click_html(struct browser_window *bw, url_func_result res; /* search the box tree for a link, imagemap, or form control */ - while ((box = box_at_point(box, x, y, &box_x, &box_y, &content))) { + while ((box = box_at_point(box, x, y, &box_x, &box_y, &content)) != NULL) { if (box->style && box->style->visibility == CSS_VISIBILITY_HIDDEN) continue; diff --git a/desktop/imagemap.c b/desktop/imagemap.c index f5ab1ad06..b223bcf3f 100644 --- a/desktop/imagemap.c +++ b/desktop/imagemap.c @@ -201,8 +201,7 @@ void imagemap_extract(xmlNode *node, struct content *c) { if (node->type == XML_ELEMENT_NODE) { if (strcmp(node->name, "map") == 0) { - if (!(name = (char*)xmlGetProp(node, - (const xmlChar*)"name"))) + if ((name = (char*)xmlGetProp(node, (const xmlChar*)"name")) == NULL) return; entry = imagemap_extract_map(node, c, entry); imagemap_add(c, name, entry); @@ -254,16 +253,16 @@ struct mapentry *imagemap_addtolist(xmlNode *n, struct mapentry *entry) { } } /* no href -> ignore */ - if (!(href = (char*)xmlGetProp(n, (const xmlChar*)"href"))) { + if ((href = (char*)xmlGetProp(n, (const xmlChar*)"href")) == NULL) { return entry; } /* no shape -> shape is a rectangle */ - if (!(shape = (char*)xmlGetProp(n, (const xmlChar*)"shape"))) { + if ((shape = (char*)xmlGetProp(n, (const xmlChar*)"shape")) == NULL) { shape = (char*)xmlMemStrdup("rect"); } if (strcasecmp(shape, "default") != 0) { /* no coords -> ignore */ - if (!(coords = (char*)xmlGetProp(n, (const xmlChar*)"coords"))) { + if ((coords = (char*)xmlGetProp(n, (const xmlChar*)"coords")) == NULL) { xmlFree(href); xmlFree(shape); return entry; |