mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
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> Reviewed-on: https://review.coreboot.org/c/flashrom/+/55358 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:
parent
a6e4df6624
commit
6d438d4295
@ -947,7 +947,7 @@ static int dummy_init(void)
|
||||
{
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user