From 4e27cad44dec5443617840bd6995a921cc2689aa Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Sat, 12 Nov 2022 12:05:36 +1100 Subject: tree/: Make heap alloc checks err msg consistent Change-Id: Id84a9f15c33781efc494ed36a1c7cec82a0333d6 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/69472 Reviewed-by: Felix Singer Tested-by: build bot (Jenkins) --- flashrom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'flashrom.c') diff --git a/flashrom.c b/flashrom.c index 51a6b6443..fde6d5a14 100644 --- a/flashrom.c +++ b/flashrom.c @@ -454,7 +454,7 @@ static int check_erased_range(struct flashctx *flash, unsigned int start, unsign const uint8_t erased_value = ERASED_VALUE(flash); if (!cmpbuf) { - msg_gerr("Could not allocate memory!\n"); + msg_gerr("Out of memory!\n"); exit(1); } memset(cmpbuf, erased_value, len); @@ -513,7 +513,7 @@ int verify_range(struct flashctx *flash, const uint8_t *cmpbuf, unsigned int sta uint8_t *readbuf = malloc(len); if (!readbuf) { - msg_gerr("Could not allocate memory!\n"); + msg_gerr("Out of memory!\n"); return -1; } -- cgit v1.2.3