Markus Armbruster <arm...@redhat.com> writes:

> Marc-André Lureau <marcandre.lur...@redhat.com> 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 <marcandre.lur...@redhat.com>
>> ---
>>  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.

Maybe I should peek at the next patch once in a while.  Nevermind!

> With those changes:

Scratch "those changes", just touch up the commit message a bit:

    qlit: rename compare_litqobj_to_qobj() to qlit_equal_qobject()

    compare_litqobj_to_qobj() lacks a qlit_ prefix.  Moreover, "compare"
    suggests -1, 0, +1 for less than, equal and greater than.  The
    function actually returns non-zero for equal, zero for unequal.
    Rename to qlit_equal_qobject().

    Its return type will be cleaned up in the next patch.

Can do on commit.

> Reviewed-by: Markus Armbruster <arm...@redhat.com>

Reply via email to