On Tue, 2019-06-25 at 15:29 +0200, Laszlo Ersek wrote: > (2) You removed the NULL-initialization altogether,
Well yeah, you told me the EDK-II coding standards forbid the common
defensive coding technique used in the language called "C", of
initialising the variable where it's declared. I wasn't up for arguing
about it, so I just stopped doing it.
Now you tell me to put it back, just in a more cumbersome way... OK,
I'll do that too.
I'm not sure the answer is going to make me any happier... but *why*
are we not allowed to just initialise variables where they're declared?
> > +
> > + //
> > + // Truncate Description and convert to ASCII.
> > + //
> > + if (StrLen (Description) >= sizeof (AsciiDescription)) {
> > + Description[sizeof (AsciiDescription) - 1] = L'0';
>
> (3) Sneaky typo. You mean (and I requested) L'\0'. L'0' is different. :)
Oops :)
What was it I said about testing of corner cases when
updating/rebasing? I had explicitly tested this by cutting the size
down to 16 and watching it actually truncate. Obviously I didn't do
*that* again this time round (I have now!)
Well spotted; thanks!
I've pushed all the fixes you've just pointed out (thanks again) to my
'csm' branch. Won't send another series by email today; I'll let the
dust settle and some of the other discussions continue.
When I do repost, I may send the required functional patches 1-3,7 on
their own as I think they're ready to apply as-is, and leave the
cosmetic patches 4-6 in a separate series for further bikeshedding.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#42825): https://edk2.groups.io/g/devel/message/42825
Mute This Topic: https://groups.io/mt/32202511/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
smime.p7s
Description: S/MIME cryptographic signature
