diff options
Diffstat (limited to 'src/xplist.c')
| -rw-r--r-- | src/xplist.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/xplist.c b/src/xplist.c index 0a6be57..1abc46d 100644 --- a/src/xplist.c +++ b/src/xplist.c | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | #include <limits.h> | 41 | #include <limits.h> |
| 42 | 42 | ||
| 43 | #include <node.h> | 43 | #include <node.h> |
| 44 | #include <node_list.h> | ||
| 45 | 44 | ||
| 46 | #include "plist.h" | 45 | #include "plist.h" |
| 47 | #include "base64.h" | 46 | #include "base64.h" |
| @@ -127,7 +126,7 @@ static size_t dtostr(char *buf, size_t bufsize, double realval) | |||
| 127 | return len; | 126 | return len; |
| 128 | } | 127 | } |
| 129 | 128 | ||
| 130 | static int node_to_xml(node_t* node, bytearray_t **outbuf, uint32_t depth) | 129 | static int node_to_xml(node_t node, bytearray_t **outbuf, uint32_t depth) |
| 131 | { | 130 | { |
| 132 | plist_data_t node_data = NULL; | 131 | plist_data_t node_data = NULL; |
| 133 | 132 | ||
| @@ -358,7 +357,7 @@ static int node_to_xml(node_t* node, bytearray_t **outbuf, uint32_t depth) | |||
| 358 | if (node_data->type == PLIST_DICT && node->children) { | 357 | if (node_data->type == PLIST_DICT && node->children) { |
| 359 | assert((node->children->count % 2) == 0); | 358 | assert((node->children->count % 2) == 0); |
| 360 | } | 359 | } |
| 361 | node_t *ch; | 360 | node_t ch; |
| 362 | for (ch = node_first_child(node); ch; ch = node_next_sibling(ch)) { | 361 | for (ch = node_first_child(node); ch; ch = node_next_sibling(ch)) { |
| 363 | int res = node_to_xml(ch, outbuf, depth+1); | 362 | int res = node_to_xml(ch, outbuf, depth+1); |
| 364 | if (res < 0) return res; | 363 | if (res < 0) return res; |
| @@ -438,7 +437,7 @@ static int num_digits_u(uint64_t i) | |||
| 438 | return n; | 437 | return n; |
| 439 | } | 438 | } |
| 440 | 439 | ||
| 441 | static int node_estimate_size(node_t *node, uint64_t *size, uint32_t depth) | 440 | static int node_estimate_size(node_t node, uint64_t *size, uint32_t depth) |
| 442 | { | 441 | { |
| 443 | plist_data_t data; | 442 | plist_data_t data; |
| 444 | if (!node) { | 443 | if (!node) { |
| @@ -446,7 +445,7 @@ static int node_estimate_size(node_t *node, uint64_t *size, uint32_t depth) | |||
| 446 | } | 445 | } |
| 447 | data = plist_get_data(node); | 446 | data = plist_get_data(node); |
| 448 | if (node->children) { | 447 | if (node->children) { |
| 449 | node_t *ch; | 448 | node_t ch; |
| 450 | for (ch = node_first_child(node); ch; ch = node_next_sibling(ch)) { | 449 | for (ch = node_first_child(node); ch; ch = node_next_sibling(ch)) { |
| 451 | node_estimate_size(ch, size, depth + 1); | 450 | node_estimate_size(ch, size, depth + 1); |
| 452 | } | 451 | } |
| @@ -1413,7 +1412,7 @@ static int node_from_xml(parse_ctx ctx, plist_t *plist) | |||
| 1413 | node_path = node_path->prev; | 1412 | node_path = node_path->prev; |
| 1414 | free(path_item); | 1413 | free(path_item); |
| 1415 | 1414 | ||
| 1416 | parent = ((node_t*)parent)->parent; | 1415 | parent = ((node_t)parent)->parent; |
| 1417 | if (!parent) { | 1416 | if (!parent) { |
| 1418 | goto err_out; | 1417 | goto err_out; |
| 1419 | } | 1418 | } |
