[PATCH 4/4] format: Don't use deprecated json-c is_error() macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2014-08-18 at 14:47 +0200, Peter Meerwald wrote:
> From: Peter Meerwald <p.meerwald at bct-electronic.com>
> 
> json_tokener_parse() simply returns NULL on error these days
> 
> latest json-c (post 0.12) doesn't automatically include json-c/bits.h anymore
> causing compilation errors
> 
> Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
> ---
>  src/pulse/format.c |   18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/src/pulse/format.c b/src/pulse/format.c
> index 995e3df..e0a2d98 100644
> --- a/src/pulse/format.c
> +++ b/src/pulse/format.c
> @@ -249,7 +249,7 @@ pa_prop_type_t pa_format_info_get_prop_type(const pa_format_info *f, const char
>          return PA_PROP_TYPE_INVALID;
>  
>      o = json_tokener_parse(str);
> -    if (is_error(o))
> +    if (!o)
>          return PA_PROP_TYPE_INVALID;
>  
>      switch (json_object_get_type(o)) {
> @@ -289,7 +289,7 @@ pa_prop_type_t pa_format_info_get_prop_type(const pa_format_info *f, const char
>                  break;
>              }
>  
> -            if (!json_object_object_get_ex(o, PA_JSON_MAX_KEY, NULL) {
> +            if (!json_object_object_get_ex(o, PA_JSON_MAX_KEY, NULL)) {

Looks like this change should really be part of the commit that
introduces json_object_object_get_ex().

Otherwise, the patches look good, so please fix this then go ahead and
push.

Cheers,
Arun



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux