Attention is currently required from: Edward O'Callaghan, Angel Pons, Daniel Campello, Anastasia Klimchuk.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/33521 )
Change subject: layout: Use linked list for `struct romentry`
......................................................................
Patch Set 8:
(2 comments)
File layout.c:
https://review.coreboot.org/c/flashrom/+/33521/comment/0111516e_643ae007
PS8, Line 388: *layout = malloc(sizeof(**layout));
Given that you memset() the allocated space afterwards, use calloc() instead?
I like to see it explicitly if something is cleared explicitly. I can try
something else, though. Maybe you'll like it better.
https://review.coreboot.org/c/flashrom/+/33521/comment/00d12983_54967aad
PS8, Line 458: if (layout == global_layout)
: return;
:
: while (layout && layout->head) {
: struct romentry *const entry = layout->head;
: layout->head = entry->next;
: free(entry->file);
: free(entry->name);
: free(entry);
: }
: free(layout);
Given that `layout` is not modified in the while loop, how about evaluating it once? […]
Ack. Might make it less odd to read.
--
To view, visit
https://review.coreboot.org/c/flashrom/+/33521
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I60a0aa1007ebcd5eb401db116f835d129b3e9732
Gerrit-Change-Number: 33521
Gerrit-PatchSet: 8
Gerrit-Owner: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Anastasia Klimchuk
aklm@chromium.org
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Reviewer: Daniel Campello
campello@chromium.org
Gerrit-Reviewer: David Hendricks
david.hendricks@gmail.com
Gerrit-Reviewer: Edward O'Callaghan
quasisec@chromium.org
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Peter Marheine
pmarheine@chromium.org
Gerrit-Reviewer: Thomas Heijligen
src@posteo.de
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Edward O'Callaghan
quasisec@chromium.org
Gerrit-Attention: Angel Pons
th3fanbus@gmail.com
Gerrit-Attention: Daniel Campello
campello@chromium.org
Gerrit-Attention: Anastasia Klimchuk
aklm@chromium.org
Gerrit-Comment-Date: Sat, 26 Jun 2021 00:10:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons
th3fanbus@gmail.com
Gerrit-MessageType: comment