summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-04-16 12:49:49 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-04-16 12:49:49 +0000
commit6a7b1a73a7bcc4e4e6ee3a2343fd11b2453aefb1 (patch)
treede7b79a609c26b5deb62d0b1b0139ef2513528c1 /render
parent3a12ed0facbdbc79b358d48d78f158a735ee6158 (diff)
downloadnetsurf-6a7b1a73a7bcc4e4e6ee3a2343fd11b2453aefb1.tar.gz
netsurf-6a7b1a73a7bcc4e4e6ee3a2343fd11b2453aefb1.tar.bz2
Fix compilation with GCC 2.95.
It astounds me how some of this lot compiled at all. svn path=/trunk/netsurf/; revision=7104
Diffstat (limited to 'render')
-rw-r--r--render/box_construct.c18
-rw-r--r--render/hubbub_binding.c4
-rw-r--r--render/list.c2
-rw-r--r--render/table.c2
4 files changed, 13 insertions, 13 deletions
diff --git a/render/box_construct.c b/render/box_construct.c
index 4f9bdfd32..dc354586e 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -2030,7 +2030,7 @@ bool box_create_frameset(struct content_html_frames *f, xmlNode *n,
xmlFree(s);
}
frame->no_resize = xmlHasProp(c,
- (const xmlChar *) "noresize");
+ (const xmlChar *) "noresize") != NULL;
if ((s = (char *) xmlGetProp(c,
(const xmlChar *) "frameborder"))) {
i = atoi(s);
@@ -2448,25 +2448,25 @@ bool box_input_text(BOX_SPECIAL_PARAMS, bool password)
xmlFree(s);
if (box->gadget->value == NULL || box->gadget->initial_value == NULL) {
box_free(box);
- return NULL;
+ return false;
}
box->gadget->length = strlen(box->gadget->value);
#endif
inline_container = box_create(0, 0, 0, 0, 0, content);
if (!inline_container)
- return 0;
+ return false;
inline_container->type = BOX_INLINE_CONTAINER;
inline_box = box_create(box->style, 0, 0, box->title, 0, content);
if (!inline_box)
- return 0;
+ return false;
inline_box->type = BOX_TEXT;
if (password) {
inline_box->length = strlen(box->gadget->value);
inline_box->text = talloc_array(content, char,
inline_box->length + 1);
if (!inline_box->text)
- return 0;
+ return false;
memset(inline_box->text, '*', inline_box->length);
inline_box->text[inline_box->length] = '\0';
} else {
@@ -2474,17 +2474,17 @@ bool box_input_text(BOX_SPECIAL_PARAMS, bool password)
* wrapping */
char *text = cnv_space2nbsp(box->gadget->value);
if (!text)
- return 0;
+ return false;
inline_box->text = talloc_strdup(content, text);
free(text);
if (!inline_box->text)
- return 0;
+ return false;
inline_box->length = strlen(inline_box->text);
}
box_add_child(inline_container, inline_box);
box_add_child(box, inline_container);
- return box;
+ return true;
}
@@ -2693,7 +2693,7 @@ bool box_select_add_option(struct form_control *control, xmlNode *n)
if (!value)
goto no_memory;
- selected = xmlHasProp(n, (const xmlChar *) "selected");
+ selected = xmlHasProp(n, (const xmlChar *) "selected") != NULL;
/* replace spaces/TABs with hard spaces to prevent line wrapping */
text_nowrap = cnv_space2nbsp(text);
diff --git a/render/hubbub_binding.c b/render/hubbub_binding.c
index 3bab8f260..a99bcf7cb 100644
--- a/render/hubbub_binding.c
+++ b/render/hubbub_binding.c
@@ -864,7 +864,7 @@ struct form_control *parse_input_element(xmlNode *node)
if (control->type == GADGET_CHECKBOX || control->type == GADGET_RADIO) {
control->selected =
- xmlHasProp(node, (const xmlChar *) "checked");
+ xmlHasProp(node, (const xmlChar *) "checked") != NULL;
}
if (control->type == GADGET_PASSWORD ||
@@ -983,7 +983,7 @@ struct form_control *parse_select_element(xmlNode *node)
return NULL;
control->data.select.multiple =
- xmlHasProp(node, (const xmlChar *) "multiple");
+ xmlHasProp(node, (const xmlChar *) "multiple") != NULL;
name = xmlGetProp(node, (const xmlChar *) "name");
if (name != NULL) {
diff --git a/render/list.c b/render/list.c
index 8b5ef698e..84b5beffc 100644
--- a/render/list.c
+++ b/render/list.c
@@ -186,7 +186,7 @@ bool render_list_counter_increment(char *name, int value) {
if (counter->state)
counter->state->count += value;
/* render_list_counter_output(name);
-*/ return (counter->state);
+*/ return counter->state != NULL;
}
diff --git a/render/table.c b/render/table.c
index e0172994e..9423401f3 100644
--- a/render/table.c
+++ b/render/table.c
@@ -216,7 +216,7 @@ void table_collapse_borders(struct box *table)
assert(row_group->type == BOX_TABLE_ROW_GROUP);
assert(row_group->style);
table_collapse_borders_h(table, row_group, &first);
- first = (row_group->children);
+ first = row_group->children != NULL;
for (row = row_group->children; row; row = row->next) {
assert(row->type == BOX_TABLE_ROW);
assert(row->style);