summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2018-12-19 15:30:39 +0000
committerNico Huber <nico.h@gmx.de>2019-02-03 19:08:33 +0000
commit84b453e4d4140230bd4d72d530b2b08f9a51b4e2 (patch)
tree103cd0d186c54a7e80921a3813abd8d24292e581
parentdf4905822754ac1f303f7939f5b77b35e5ac4a67 (diff)
downloadflashrom-84b453e4d4140230bd4d72d530b2b08f9a51b4e2.tar.gz
flashrom-84b453e4d4140230bd4d72d530b2b08f9a51b4e2.tar.bz2
flashrom-84b453e4d4140230bd4d72d530b2b08f9a51b4e2.zip
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>
-rw-r--r--flashrom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/flashrom.c b/flashrom.c
index cb2da46f7..e82c32e86 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1461,7 +1461,7 @@ static int read_by_layout(struct flashctx *, uint8_t *);
int read_flash_to_file(struct flashctx *flash, const char *filename)
{
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;
msg_cinfo("Reading flash... ");