From: "David Woodhouse" <dwmw2@infradead.org>
To: devel@edk2.groups.io, lersek@redhat.com
Cc: Ray Ni <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH v2 5/7] OvmfPkg/LegacyBiosDxe: Use EfiBootManagerGetBootDescription()
Date: Tue, 25 Jun 2019 15:10:08 +0100 [thread overview]
Message-ID: <76174dc3b41dbc62d9d953522c2474707afea2df.camel@infradead.org> (raw)
In-Reply-To: <7f917141-3522-c8f0-2f06-b9d5e52a5b58@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]
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.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]
next prev parent reply other threads:[~2019-06-25 14:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 11:48 [PATCH v2 1/7] OvmfPkg/LegacyBios: set NumberBbsEntries to the size of BbsTable David Woodhouse
2019-06-25 11:48 ` [PATCH v2 2/7] OvmfPkg/LegacyBbs: Add boot entries for VirtIO and NVME devices David Woodhouse
2019-06-25 11:48 ` [PATCH v2 3/7] OvmfPkg: Don't build in QemuVideoDxe when we have CSM David Woodhouse
2019-06-25 11:48 ` [PATCH v2 4/7] MdeModulePkg/UefiBootManagerLib: export EfiBootManagerGetBootDescription() David Woodhouse
2019-06-27 2:12 ` [edk2-devel] " Ni, Ray
2019-06-25 11:48 ` [PATCH v2 5/7] OvmfPkg/LegacyBiosDxe: Use EfiBootManagerGetBootDescription() David Woodhouse
2019-06-25 13:29 ` Laszlo Ersek
2019-06-25 14:10 ` David Woodhouse [this message]
2019-06-25 19:16 ` [edk2-devel] " Laszlo Ersek
2019-06-25 11:48 ` [PATCH v2 6/7] MdeModulePkg/UefiBootManagerLib: describe VirtIO devices correctly David Woodhouse
2019-06-25 13:44 ` Laszlo Ersek
2019-06-25 11:48 ` [PATCH v2 7/7] OvmfPkg: don't assign PCI BARs above 4GiB when CSM enabled David Woodhouse
2019-06-25 13:47 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=76174dc3b41dbc62d9d953522c2474707afea2df.camel@infradead.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox