From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xose Vazquez Perez Subject: Re: [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0. Date: Fri, 29 May 2020 13:45:09 +0200 Message-ID: <42eef647-d9ef-7956-5852-27188bc4665f@gmail.com> References: <1590725443-3519-1-git-send-email-bmarzins@redhat.com> <1590725443-3519-2-git-send-email-bmarzins@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Martin Wilck , "bmarzins@redhat.com" , "christophe.varoqui@opensvc.com" Cc: "mail@eworm.de" , "dm-devel@redhat.com" , "besser82@fedoraproject.org" , Eric Haszlakiewicz List-Id: dm-devel.ids On 5/29/20 11:12 AM, Martin Wilck wrote: > On Thu, 2020-05-28 at 23:10 -0500, Benjamin Marzinski wrote: >> From: Bj=C3=B6rn Esser >> >> TRUE/FALSE are not defined anymore. 1 and 0 are used instead. >> This is backwards compatible, as earlier versions of json-c are >> using the same integer values in their present definitions. >> >> Signed-off-by: Benjamin Marzinski >> --- >> libdmmp/libdmmp_private.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h >> index ac85b63f..4378962b 100644 >> --- a/libdmmp/libdmmp_private.h >> +++ b/libdmmp/libdmmp_private.h >> @@ -82,7 +82,7 @@ static out_type func_name(struct dmmp_context *ctx, >> const char *var_name) { \ >> do { \ >> =09json_type j_type =3D json_type_null; \ >> =09json_object *j_obj_tmp =3D NULL; \ >> -=09if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) !=3D TRUE) >> { \ >> +=09if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) !=3D 1) { \ >> =09=09_error(ctx, "Invalid JSON output from multipathd IPC: " >> \ >> =09=09 "key '%s' not found", key); \ >> =09=09rc =3D DMMP_ERR_IPC_ERROR; \ >=20 > Did you see > https://www.redhat.com/archives/dm-devel/2020-May/msg00261.html ? >=20 > This has first been reported to the list by Christian ( > https://www.redhat.com/archives/dm-devel/2020-April/msg00261.html), and > brought to my attention later by Xose. I personally thought the change > from boolean to int is a step in the wrong direction, therefore I > submitted my modified version using stdboolh. If everyone else is fine > with the int, it's not worth arguing about it. >=20 > Regards, > Martin >=20 > PS: Can anyone explain why json-c did this? Looks like a "cause hassle > for downstream devs and users for no good reason" kind of thing to > me... >=20 Add Eric Haszlakiewicz to CC. Done at: https://github.com/json-c/json-c/commit/0992aac61f8b087efd7094e9ac= 2b84fa9c040fcd