summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2017-09-10 10:57:02 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2017-09-10 14:53:15 (GMT)
commit50688cde51ae5f78af59a43d56ad687f62e9bfe5 (patch)
treed98d168d355324ae7c94802956e513dcb93f3117
parent37127c4a52b6d85faef379ad6c6e07f63b1ccf46 (diff)
downloadnetsurf-50688cde51ae5f78af59a43d56ad687f62e9bfe5.tar.gz
netsurf-50688cde51ae5f78af59a43d56ad687f62e9bfe5.tar.bz2
Treeview: Improve some code wrapping.
-rw-r--r--desktop/treeview.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 2779550..765d927 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -962,7 +962,7 @@ treeview_create_node_entry(treeview *tree,
}
e = malloc(sizeof(struct treeview_node_entry) +
- (tree->n_fields - 1) * sizeof(struct treeview_field));
+ (tree->n_fields - 1) * sizeof(struct treeview_field));
if (e == NULL) {
return NSERROR_NOMEM;
}
@@ -978,8 +978,8 @@ treeview_create_node_entry(treeview *tree,
assert(fields != NULL);
assert(fields[0].field != NULL);
assert(lwc_string_isequal(tree->fields[0].field,
- fields[0].field, &match) == lwc_error_ok &&
- match == true);
+ fields[0].field, &match) == lwc_error_ok &&
+ match == true);
n->text.data = fields[0].value;
n->text.len = fields[0].value_len;
n->text.width = 0;
@@ -994,8 +994,8 @@ treeview_create_node_entry(treeview *tree,
for (i = 1; i < tree->n_fields; i++) {
assert(fields[i].field != NULL);
assert(lwc_string_isequal(tree->fields[i].field,
- fields[i].field, &match) == lwc_error_ok &&
- match == true);
+ fields[i].field, &match) == lwc_error_ok &&
+ match == true);
e->fields[i - 1].value.data = fields[i].value;
e->fields[i - 1].value.len = fields[i].value_len;
@@ -1103,11 +1103,10 @@ treeview_walk(treeview *tree,
if (root == NULL)
root = tree->root;
- return treeview_walk_internal(root,
- true,
- (leave_cb != NULL) ? treeview_walk_bwd_cb : NULL,
- (enter_cb != NULL) ? treeview_walk_fwd_cb : NULL,
- &tw);
+ return treeview_walk_internal(root, true,
+ (leave_cb != NULL) ? treeview_walk_bwd_cb : NULL,
+ (enter_cb != NULL) ? treeview_walk_fwd_cb : NULL,
+ &tw);
}