Re: [PATCH] vircapstest: Avoid (im)possible strcmp call with NULL argument

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

 



On 11/13/2017 10:44 PM, Jiri Denemark wrote:
> Some compiler may get confused and decide we are calling strcmp with
> NULL argument from test_virCapsDomainDataLookupLXC. Although this does
> not really happen since the call is guarded with
> (data->machinetype != expect_machinetype), using STRNEQ_NULLABLE is
> easier to understand, less fragile, and doing so makes sure strcmp is
> never called with NULL argument.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  tests/vircapstest.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

ACK

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux