On 11/25/2015 02:23 PM, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> ---
>  qobject/json-parser.c | 20 +++++++-------------
>  1 file changed, 7 insertions(+), 13 deletions(-)
> 

>  
> -    if (token_is_keyword(token, "true")) {
> +    val = token_get_value(token);
> +
> +    if (!strcmp(val, "true")) {
>          ret = QOBJECT(qbool_from_bool(true));
> -    } else if (token_is_keyword(token, "false")) {
> +    } else if (!strcmp(val, "false")) {
>          ret = QOBJECT(qbool_from_bool(false));
> -    } else if (token_is_keyword(token, "null")) {
> +    } else if (!strcmp(val, "null")) {
>          ret = qnull();
>      } else {
> -        parse_error(ctxt, token, "invalid keyword `%s'", 
> token_get_value(token));
> +        parse_error(ctxt, token, "invalid keyword '%s'", val);

Yay - fewer `' in error messages.  (Great back in the day when fonts
rendered them symmetrically, and still useful in m4; but lousy for
pasting into shell code and in modern fonts)

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to