Attention is currently required from: Angel Pons, Anastasia Klimchuk. Hello Angel Pons, Anastasia Klimchuk,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/flashrom/+/55358
to review the following change.
Change subject: dummyflasher: Replace another case of `sizeof(struct ...)` ......................................................................
dummyflasher: Replace another case of `sizeof(struct ...)`
Using the pointer's type instead ensures that we get the right size even if code changes in the future.
Change-Id: If88ba394095f86c598dcc5cf1751e1c23b132d04 Signed-off-by: Nico Huber nico.huber@secunet.com --- M dummyflasher.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/58/55358/1
diff --git a/dummyflasher.c b/dummyflasher.c index ba06e7c..eb3789c 100644 --- a/dummyflasher.c +++ b/dummyflasher.c @@ -947,7 +947,7 @@ { struct stat image_stat;
- struct emu_data *data = calloc(1, sizeof(struct emu_data)); + struct emu_data *data = calloc(1, sizeof(*data)); if (!data) { msg_perr("Out of memory!\n"); return 1;