[PATCH] cli: slighly more clear error messages

From e8a2f8a7098f4b18bbbf859ca7c765ebfcd944b0 Mon Sep 17 00:00:00 2001
From: "peng.wang@smartm.com" peng.wang@smartm.com Date: Tue, 4 May 2021 01:45:59 -0700 Subject: [PATCH] cli: slighly more clear error messages
This patch tries to distinguish two error messages.
Signed-off-by: peng.wang@smartm.com peng.wang@smartm.com --- common/cli_hush.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/cli_hush.c b/common/cli_hush.c index 6cff3b1185..1467ff81b3 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -3325,7 +3325,7 @@ static void *xmalloc(size_t size) void *p = NULL;
if (!(p = malloc(size))) { - printf("ERROR : memory not allocated\n"); + printf("ERROR : xmalloc failed\n"); for(;;); } return p; @@ -3336,7 +3336,7 @@ static void *xrealloc(void *ptr, size_t size) void *p = NULL;
if (!(p = realloc(ptr, size))) { - printf("ERROR : memory not allocated\n"); + printf("ERROR : xrealloc failed\n"); for(;;); } return p;
participants (1)
-
Wang, Peng