summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/plist/plist.h1
-rw-r--r--src/plist.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h
index 7605975..47eda51 100644
--- a/include/plist/plist.h
+++ b/include/plist/plist.h
@@ -158,6 +158,7 @@ extern "C"
158 */ 158 */
159 typedef enum 159 typedef enum
160 { 160 {
161 PLIST_FORMAT_NONE = 0, /**< No format */
161 PLIST_FORMAT_XML = 1, /**< XML format */ 162 PLIST_FORMAT_XML = 1, /**< XML format */
162 PLIST_FORMAT_BINARY = 2, /**< bplist00 format */ 163 PLIST_FORMAT_BINARY = 2, /**< bplist00 format */
163 PLIST_FORMAT_JSON = 3, /**< JSON format */ 164 PLIST_FORMAT_JSON = 3, /**< JSON format */
diff --git a/src/plist.c b/src/plist.c
index 677e398..ccb7359 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -207,8 +207,8 @@ plist_err_t plist_from_memory(const char *plist_data, uint32_t length, plist_t *
207 if (!plist_data || length == 0) { 207 if (!plist_data || length == 0) {
208 return PLIST_ERR_INVALID_ARG; 208 return PLIST_ERR_INVALID_ARG;
209 } 209 }
210 plist_format_t fmt = 0; 210 plist_format_t fmt = PLIST_FORMAT_NONE;
211 if (format) *format = 0; 211 if (format) *format = PLIST_FORMAT_NONE;
212 if (plist_is_binary(plist_data, length)) { 212 if (plist_is_binary(plist_data, length)) {
213 res = plist_from_bin(plist_data, length, plist); 213 res = plist_from_bin(plist_data, length, plist);
214 fmt = PLIST_FORMAT_BINARY; 214 fmt = PLIST_FORMAT_BINARY;