aboutsummaryrefslogtreecommitdiffstats
path: root/community/libu2f-host/json-c-0.14.patch
blob: e701d2c9115a89606c1c0563f8b67c3c6841e2af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
diff --git a/u2f-host/u2fmisc.c b/u2f-host/u2fmisc.c
index e40ca3d..3c948af 100644
--- a/u2f-host/u2fmisc.c
+++ b/u2f-host/u2fmisc.c
@@ -30,7 +30,7 @@
 #define u2fh_json_object_object_get(obj, key, value) json_object_object_get_ex(obj, key, &value)
 #else
 typedef int json_bool;
-#define u2fh_json_object_object_get(obj, key, value) (value = json_object_object_get(obj, key)) == NULL ? (json_bool)FALSE : (json_bool)TRUE
+#define u2fh_json_object_object_get(obj, key, value) (value = json_object_object_get(obj, key)) == NULL ? (json_bool)0 : (json_bool)1
 #endif
 
 static void
@@ -114,7 +114,7 @@ prepare_origin (const char *jsonstr, unsigned char *p)
   if (debug)
     fprintf (stderr, "JSON: %s\n", json_object_to_json_string (jo));
 
-  if (u2fh_json_object_object_get (jo, "appId", k) == FALSE)
+  if (u2fh_json_object_object_get (jo, "appId", k) == 0)
     return U2FH_JSON_ERROR;
 
   app_id = json_object_get_string (k);
@@ -390,7 +390,7 @@ get_fixed_json_data (const char *jsonstr, const char *key, char *p,
   if (debug)
     fprintf (stderr, "JSON: %s\n", json_object_to_json_string (jo));
 
-  if (u2fh_json_object_object_get (jo, key, k) == FALSE)
+  if (u2fh_json_object_object_get (jo, key, k) == 0)
     return U2FH_JSON_ERROR;
 
   urlb64 = json_object_get_string (k);