diff options
author | Nikias Bassen | 2015-09-24 20:21:05 +0200 |
---|---|---|
committer | Nikias Bassen | 2015-09-24 20:21:05 +0200 |
commit | 448c063a4ade0713faccf6664f958072c8363f34 (patch) | |
tree | f0063360e7d448556dc74a4e9e2816dd8fa3f1c8 | |
parent | 719b964e80e330001e4004c0d2deba3e0a6ed05c (diff) | |
download | idevicerestore-448c063a4ade0713faccf6664f958072c8363f34.tar.gz idevicerestore-448c063a4ade0713faccf6664f958072c8363f34.tar.bz2 |
common: Remove plist_dict_merge() as it's already provided by libplist
Also, set libplist requirement to 1.12
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/common.c | 26 | ||||
-rw-r--r-- | src/common.h | 2 |
3 files changed, 1 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac index 25da9ca..7f38884 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ AC_PROG_LIBTOOL PKG_CHECK_MODULES(libirecovery, libirecovery >= 0.2.0) PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 1.1.6) -PKG_CHECK_MODULES(libplist, libplist >= 1.11) +PKG_CHECK_MODULES(libplist, libplist >= 1.12) PKG_CHECK_MODULES(libzip, libzip >= 0.8) PKG_CHECK_MODULES(libcurl, libcurl >= 7.0) PKG_CHECK_MODULES(openssl, openssl >= 0.9.8) diff --git a/src/common.c b/src/common.c index efc8431..a36d222 100644 --- a/src/common.c +++ b/src/common.c @@ -282,29 +282,3 @@ void idevicerestore_progress(struct idevicerestore_client_t* client, int step, d } } } - -void plist_dict_merge(plist_t* dictionary, plist_t node) -{ - if (dictionary == NULL || (plist_get_node_type(*dictionary) != PLIST_DICT)) - return; - - char* key = NULL; - plist_dict_iter it = NULL; - plist_t subnode = NULL; - plist_dict_new_iter(node, &it); - plist_dict_next_item(node, it, &key, &subnode); - - while (subnode) - { - if (plist_dict_get_item(*dictionary, key) != NULL) - plist_dict_remove_item(*dictionary, key); - - plist_dict_set_item(*dictionary, key, plist_copy(subnode)); - if (key) { - free(key); - key = NULL; - } - plist_dict_next_item(node, it, &key, &subnode); - } - free(it); -} diff --git a/src/common.h b/src/common.h index f7c9fd2..8340d03 100644 --- a/src/common.h +++ b/src/common.h @@ -131,8 +131,6 @@ int mkdir_with_parents(const char *dir, int mode); void idevicerestore_progress(struct idevicerestore_client_t* client, int step, double progress); -void plist_dict_merge(plist_t* dictionary, plist_t node); - #ifdef __cplusplus } #endif |