[libvirt] [PATCH] internal: Simplify STREQ_NULLABLE

Michal Privoznik mprivozn at redhat.com
Thu Jan 5 14:47:40 UTC 2017


On 01/05/2017 02:51 PM, John Ferlan wrote:
> 
> 
> 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?

Eric states in the original commit that it is 4.7 what's broken. That's
ancient history so I think even rhel6 is safe.

Michal




More information about the libvir-list mailing list