summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bplist.c10
-rw-r--r--src/plist.c8
-rw-r--r--src/plist.h1
3 files changed, 5 insertions, 14 deletions
diff --git a/src/bplist.c b/src/bplist.c
index 67d7f72..0140f88 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -268,7 +268,7 @@ static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_objec
plist_t size_node = parse_bin_node(object, dict_size, &object);
if (plist_get_node_type(size_node) != PLIST_UINT)
return NULL;
- size = plist_get_node_uint_val(size_node);
+ plist_get_uint_val(size_node, &size);
}
return parse_data_node(object, size);
@@ -277,7 +277,7 @@ static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_objec
plist_t size_node = parse_bin_node(object, dict_size, &object);
if (plist_get_node_type(size_node) != PLIST_UINT)
return NULL;
- size = plist_get_node_uint_val(size_node);
+ plist_get_uint_val(size_node, &size);
}
return parse_string_node(object, size);
@@ -286,7 +286,7 @@ static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_objec
plist_t size_node = parse_bin_node(object, dict_size, &object);
if (plist_get_node_type(size_node) != PLIST_UINT)
return NULL;
- size = plist_get_node_uint_val(size_node);
+ plist_get_uint_val(size_node, &size);
}
return parse_unicode_node(object, size);
@@ -296,7 +296,7 @@ static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_objec
plist_t size_node = parse_bin_node(object, dict_size, &object);
if (plist_get_node_type(size_node) != PLIST_UINT)
return NULL;
- size = plist_get_node_uint_val(size_node);
+ plist_get_uint_val(size_node, &size);
}
return parse_array_node(object, size, dict_size);
@@ -306,7 +306,7 @@ static plist_t parse_bin_node(char *object, uint8_t dict_size, char **next_objec
plist_t size_node = parse_bin_node(object, dict_size, &object);
if (plist_get_node_type(size_node) != PLIST_UINT)
return NULL;
- size = plist_get_node_uint_val(size_node);
+ plist_get_uint_val(size_node, &size);
}
return parse_dict_node(object, size, dict_size);
default:
diff --git a/src/plist.c b/src/plist.c
index 709f12d..5fc2338 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -251,14 +251,6 @@ plist_type plist_get_node_type(plist_t node)
return PLIST_NONE;
}
-uint64_t plist_get_node_uint_val(plist_t node)
-{
- if (PLIST_UINT == plist_get_node_type(node))
- return plist_get_data(node)->intval;
- else
- return 0;
-}
-
void plist_add_sub_node(plist_t node, plist_t subnode)
{
if (node && subnode) {
diff --git a/src/plist.h b/src/plist.h
index 319647d..7596992 100644
--- a/src/plist.h
+++ b/src/plist.h
@@ -55,7 +55,6 @@ plist_t plist_new_node(plist_data_t data);
plist_data_t plist_get_data(const plist_t node);
plist_data_t plist_new_plist_data();
void plist_free_plist_data(plist_data_t node);
-uint64_t plist_get_node_uint_val(plist_t node);
plist_t plist_add_sub_element( plist_t node, plist_type type, const void* value, uint64_t length);
plist_t plist_find_node(plist_t plist, plist_type type, const void *value, uint64_t length);