Skip to contentSkip to conversation

fix boolean value with json-c 0.14

PATCH New Christian Hesse (by way of Christian Hesse <[email protected]>) 1 participant 1 message Apr 25, 2020 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix boolean value with json-c 0.14

Upstream removed the TRUE and FALSE defines in commit 0992aac61f8b087efd7094e9ac2b84fa9c040fcd.

---
 libdmmp/libdmmp_private.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
libdmmp/libdmmp_private.h +2 -2
index ac85b63f..29400826 100644
@@ -82,7 +82,7 @@ static out_type func_name(struct dmmp_context *ctx, const char *var_name) { \
 do { \
 	json_type j_type = json_type_null; \
 	json_object *j_obj_tmp = NULL; \
-	if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE) { \
+	if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != 1) { \
 		_error(ctx, "Invalid JSON output from multipathd IPC: " \
 		       "key '%s' not found", key); \
 		rc = DMMP_ERR_IPC_ERROR; \
@@ -90,7 +90,7 @@ do { \
 	} \
 	if (j_obj_tmp == NULL) { \
 		_error(ctx, "BUG: Got NULL j_obj_tmp from " \
-		       "json_object_object_get_ex() while it return TRUE"); \
+		       "json_object_object_get_ex() while it return 1"); \
 		rc = DMMP_ERR_BUG; \
 		goto out; \
 	} \