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

Re: [libvirt] [PATCH] uml_conf.c: don't return an uninitialized pointer



Daniel P. Berrange wrote:
...
>> Actually I did that first, but then un-did it in favor
>> of the change above.  Why?  because that initialization could
>> mask a failure to initialize in a new case.
>>
>> With per-case initialization, we'd detect the bug at
>> compile/static-analysis time.  With the up-front unconditional
>> initialization, we cannot, and would have to rely on testing to find it.
>
> It is a tradeoff, but I still prefer the initialization at time of
> declaration as a safety net, and we do use this pattern pretty much
> everywhere

Ok.  adjusted


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