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

Re: [libvirt] [PATCH 01/13] Remove manual one-shot global initializers

On 07/31/2012 01:17 PM, Daniel P. Berrange wrote:
> On Tue, Jul 31, 2012 at 01:06:59PM -0600, Eric Blake wrote:
>> On 07/31/2012 10:58 AM, Daniel P. Berrange wrote:
>>> From: "Daniel P. Berrange" <berrange redhat com>

>>> -        virRandomInitialize(time(NULL) ^ getpid()) ||
>>> -        virNodeSuspendInit() < 0)
>>> +        virRandomInitialize(time(NULL) ^ getpid()))
>> ...should we be getting rid of virRandomInitialize and doing that in a
>> one-shot initializer as well, since at least seclabeltest would have
>> benefitted from it?
> I did wonder about that when I wrote this. I didn't do it because
> obviously virRandomInitialize has a parameter passed in. Now I see
> that every single caller just does the same 'time(NULL) ^ getpid()'
> we might as well just make virRandomInitialize be 'void' and used
> the fixed pattern for seed.
> I'll do this as a followup patch though


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

Attachment: signature.asc
Description: OpenPGP digital signature

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