qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 05/14] qlit: rename compare_litqobj_to_qobj


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 05/14] qlit: rename compare_litqobj_to_qobj
Date: Fri, 25 Aug 2017 08:35:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Marc-André Lureau <address@hidden> writes:

> Use qlit_ prefix.

Let's spell it out: 

    qlit: rename compare_litqobj_to_qobj() to qlit_equal_qobject()

By the way, not only is your name shorter, it's also more precise:
"compare" suggests -1, 0, +1 for less than, equal and greater than,
equal suggests non-zero for equal, zero for unequal.

> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
>  include/qapi/qmp/qlit.h |  2 +-
>  qobject/qlit.c          |  6 +++---
>  tests/check-qjson.c     | 14 +++++++-------
>  3 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h
> index 1e9696988a..e299e8fab0 100644
> --- a/include/qapi/qmp/qlit.h
> +++ b/include/qapi/qmp/qlit.h
> @@ -44,6 +44,6 @@ struct QLitDictEntry {
>  #define QLIT_QLIST(val) \
>      { .type = QTYPE_QLIST, .value.qlist = (val) }
>  
> -int compare_litqobj_to_qobj(QLitObject *lhs, QObject *rhs);
> +int qlit_equal_qobject(QLitObject *lhs, QObject *rhs);
>  
>  #endif /* QLIT_H_ */

Let's use this opportunity to change the return value to bool.

With those changes:
Reviewed-by: Markus Armbruster <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]