summaryrefslogtreecommitdiff
path: root/desktop/imagemap.c
diff options
context:
space:
mode:
authorJohn Tytgat <joty@netsurf-browser.org>2004-08-14 14:30:12 +0000
committerJohn Tytgat <joty@netsurf-browser.org>2004-08-14 14:30:12 +0000
commit402c4ca66c7d95b1cdfc9eefbcb94947c807155b (patch)
treedbc42a5d9357d6c03d6c479bf6792754116f8adb /desktop/imagemap.c
parent7d3a242132eedadbcb96bead6dbed64729d11aaf (diff)
downloadnetsurf-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/imagemap.c')
-rw-r--r--desktop/imagemap.c9
1 files changed, 4 insertions, 5 deletions
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;