Send inn-workers mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."
Today's Topics:
1. Re: Today's patches (Julien ?LIE)
----------------------------------------------------------------------
Message: 1
Date: Thu, 14 May 2015 18:38:05 +0200
From: Julien ?LIE <[email protected]>
To: [email protected]
Subject: Re: Today's patches
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
Hi Russ,
>> ISO Standard C says that if an initializer initializes some but not all
>> elements, the additional elements are automatically initialized as if
>> "0" was explicitly given. This makes it nice to use "={0}" as a default
>> initializer, without having to update the initializer every time the
>> elements in a struct are changed.
>
> INN doesn't take advantage of this as a matter of coding style, because
> it's otherwise very easy to miss initialization sites if you add a new
> element to a struct that *shouldn't* be initialized with 0.
I have just checked how these structs are currently used, to confirm
that it is OK to initialize all of them with 0.
The initialization is now done this way:
ARTHANDLE newart = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
I hope it is fine this way (that is to say "0" instead of "NULL"
for pointers is portable enough).
--
Julien ?LIE
? Il avait juste assez de culture pour faire des citations
fausses. ? (Byron)
------------------------------
_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers
End of inn-workers Digest, Vol 72, Issue 8
******************************************