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

Re: [libvirt] [PATCH] selinux: Only create the selabel_handle once.



On Wed, Jan 23, 2013 at 01:20:48PM -0700, Eric Blake wrote:
> On 01/23/2013 01:12 PM, Richard W.M. Jones wrote:
> > +#if HAVE_SELINUX_LABEL_H
> > +static struct selabel_handle *sehandle = NULL;
> > +static virOnceControl sehandleonce = VIR_ONCE_CONTROL_INITIALIZER;
> 
> Rather than open-coding this, why not use VIR_ONCE_GLOBAL_INIT()?

Because I was copying this from virdbus.c which does it like this.
Perhaps virdbus.c should be fixed?

Version 2 coming up ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org


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