On Mon, Nov 23, 2009 at 11:43 AM, Kim Woelders <[email protected]> wrote:
> On Mon, 23 Nov 2009 03:03:01 +0100, Alan Coopersmith 
> <[email protected]> wrote:
>> Kim Woelders wrote:
>>> -    char *pattern = NULL, *ptr = NULL;
>>> +    char *pattern, *ptr;
>>
>> Why remove the initialization to NULL?
>
> They are useless assignments.

I'm in favor of removing redundant initializers, because it's
documentation that the programmer believed no initializer was
necessary, and gives the compiler the opportunity to check whether
that belief was justified. The code had better be built with warnings
turned on for possibly uninitialized variables, though.

Jamey
_______________________________________________
xorg-devel mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to