Attention is currently required from: Edward O'Callaghan, Angel Pons, Daniel Campello, Anastasia Klimchuk.
View Change
2 comments:
File layout.c:
Patch Set #8, 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.
Patch Set #8, 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 change 33521. To unsubscribe, or for help writing mail filters, visit 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