1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-30 00:13:43 +02:00

Fix a trivial calloc warning

Change-Id: Id457c15555a6ca6333474601f92982446afa40ab
Signed-off-by: Richard Hughes <richard@hughsie.com>
Reviewed-on: https://review.coreboot.org/c/31223
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Richard Hughes 2018-12-19 15:30:39 +00:00 committed by Nico Huber
parent df49058227
commit 84b453e4d4

View File

@ -1461,7 +1461,7 @@ static int read_by_layout(struct flashctx *, uint8_t *);
int read_flash_to_file(struct flashctx *flash, const char *filename) int read_flash_to_file(struct flashctx *flash, const char *filename)
{ {
unsigned long size = flash->chip->total_size * 1024; unsigned long size = flash->chip->total_size * 1024;
unsigned char *buf = calloc(size, sizeof(char)); unsigned char *buf = calloc(size, sizeof(unsigned char));
int ret = 0; int ret = 0;
msg_cinfo("Reading flash... "); msg_cinfo("Reading flash... ");