Re: [PATCH] Remove useless NULL check in virSecurityManagerGenLabel

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

 



On Wed, Apr 02, 2014 at 07:00:09AM -0600, Eric Blake wrote:
> On 04/02/2014 06:44 AM, Ján Tomko wrote:
> > Every security driver has domainGenSecurityLabel defined.
> 
> As currently written.  But Dan wrote the manager to be flexible to
> future drivers that omit obvious functions.
> 
> This patch makes sense for silencing Coverity, but I think it is
> incomplete unless you also fix the registration with the manager to
> forcefully require that all drivers supply callback functions that we
> are going to blindly assume exist, rather than the current status quo of
> allowing a driver to omit callbacks even if none of them do.  That is,
> virSecurityManagerNewDriver() should be taught to require
> drv->domainGenSecurityLabel is non-NULL.

Further this change makes  domainGenSecurityLabel an exception to
the rule now, since all others have checks for NULL. I don't object
to removing the checks for NULL and mandating non-NULL, but we should
do it for all the callbacks, or none of the callbacks.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

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