Alexander Goncharov uploaded patch set #3 to this change.
flashrom: rewrite flashbuses_to_text()
The previous implementation had no error handling, as a result the
flashrom could crash if the computer ran out of memory. The new
version returns NULL in such cases.
Also rewrite lots of `if` conditions to one cycle, store a name of
buses in an array.
The caller always expected a non-null value, so change its behavior to
handle possible null value. As far as `printf()` and `free()` can
handle null pointers, do nothing with such callers.
Change-Id: I59b9044c99b4ba6c00d8c97f1e91af09d70dce2c
Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Ticket: https://ticket.coreboot.org/issues/408
---
M flashrom.c
M print.c
2 files changed, 69 insertions(+), 20 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/39/73039/3
To view, visit change 73039. To unsubscribe, or for help writing mail filters, visit settings.