Re: [PATCH] Avoid Coverity DEADCODE warning

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

 



On 10/18/2013 11:59 AM, John Ferlan wrote:
> Commit '922b7fda' resulted in two DEADCODE warnings from Coverity in
> remoteDispatchAuthPolkit and virAccessDriverPolkitFormatProcess.
> Commit '604ae657' modified the daemon.c code to remove the deadcode
> issue, but did not do so for viracessdriverpolkit.c. This just mimics
> the same changes
> 
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
> ---
>  src/access/viraccessdriverpolkit.c | 27 +++++++++++++--------------
>  1 file changed, 13 insertions(+), 14 deletions(-)


> +#ifndef PKCHECK_SUPPORTS_UID
> +    static bool polkitInsecureWarned = false;

Since this variable is static, C guarantees this already starts life as
false, without needing the explicit initializer.  But up to you if you
want to reduce typing.

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]