summaryrefslogtreecommitdiff
path: root/src/osfp_fingerprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osfp_fingerprint.c')
-rw-r--r--src/osfp_fingerprint.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/osfp_fingerprint.c b/src/osfp_fingerprint.c
index 9652657..b7d985d 100644
--- a/src/osfp_fingerprint.c
+++ b/src/osfp_fingerprint.c
@@ -1,3 +1,9 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "cJSON.h"
+
#include "osfp_common.h"
#include "osfp.h"
@@ -221,14 +227,17 @@ int osfp_fingerprint_to_json_buf(struct osfp_fingerprint *fp, char *strbuf, unsi
return strlen(strbuf) + 1;
}
-struct osfp_fingerprint *osfp_fingerprint_from_cjson(cJSON *root)
+struct osfp_fingerprint *osfp_fingerprint_from_cjson(void *cjson_obj)
{
int i;
+ cJSON *root;
cJSON *field;
void *value_ptr;
unsigned int value_len;
struct osfp_fingerprint *fp;
+ root = (cJSON *)cjson_obj;
+
if (root == NULL) {
goto exit;
}