[libvirt] [PATCH] internal: Simplify STREQ_NULLABLE

John Ferlan jferlan at redhat.com
Thu Jan 5 13:51:09 UTC 2017



On 12/09/2016 05:55 AM, Michal Privoznik wrote:
> Our STREQ_NULLABLE and STRNEQ_NULLABLE macros are too
> complicated. This was a result of some broken version of gcc.
> However, that is long gone and therefore we can simplify the
> macros.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/internal.h        |  4 ++--
>  tests/virstringtest.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 63 insertions(+), 2 deletions(-)
> 

Going through older orphan patches...

Seems reasonable - the change being removing the '(a) ? (a) : ""' and
'(b) ? (b) : ""' from within the STR(N)EQ comparisons.

Any chance at knowing which compiler version "fixed" the issue with
strcmp and of course secondarily documenting or ensuring that version is
available in the "minimal requirements" for build?

ACK - for the code... Having that version is just extra just in case

John




More information about the libvir-list mailing list