Attention is currently required from: Anastasia Klimchuk.
Patch set 1:Code-Review +1
View Change
2 comments:
Commit Message:
File tests/flashrom.c:
Patch Set #1, Line 31: free(text);
I'd define a helper macro to avoid repeating this pattern:
#define assert_string_equal_with_free(text, expected) \
do { \
assert_string_equal(text, expected); \
free(text); \
while (0)
Two things to note:
- I've intentionally used a macro instead of a function. Because `assert_string_equal` is a macro that uses `__FILE__` and `__LINE__`, using a helper function would result in the wrong line number being printed.
- The do-while construct in the macro is intentional: https://gcc.gnu.org/onlinedocs/cpp/Swallowing-the-Semicolon.html
To view, visit change 51243. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I0c6b6b8dc17aaee28640e3fca3d1fc9f7feabf5f
Gerrit-Change-Number: 51243
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Daniel Kurtz <djkurtz@google.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Daniel Kurtz <djkurtz@chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Comment-Date: Mon, 15 Mar 2021 09:50:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment