Stephen Gallagher <sgallagh(a)redhat.com> wrote:
On 08/31/2010 07:39 AM, Jan Zelený wrote:
> Stephen Gallagher <sgallagh(a)redhat.com> wrote:
>>>> 0003-Fixed-printing-of-undefined-value-in-sdap_async_acco.patch
>>>> Ticket: #579
>>>
>>> Provided that it is safe to pass a NULL pointer to fprintf(), this is
>>> OK. I know that glibc handles this, but I'm not entirely sure if that
>>> it is good behaviour (if this would work with all possible
>>> optimalizations) and if other libc implementations behave the same as
>>> glibc.
>>
>> This is a bug in e.g. the Intel compiler, if I remember correctly.
>> Please fix fprintf. I recommend using the construct:
>> name ? name : "";
>> in the fprintf call.
>
> Wouldn't it be better just to initialize the variable with "" then?
Jakub mentioned off-list that we should probably fix this in the DEBUG()
macro, rather than trying to guard against it in each possible use-case.
I think I agree with him.
Yes, that's probably a good idea. Is the patch ACKed in that case?