cli: slighly more clear error messages
authorpeng.wang@smartm.com <peng.wang@smartm.com>
Tue, 4 May 2021 08:45:59 +0000 (01:45 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 17 May 2021 21:06:42 +0000 (17:06 -0400)
This patch tries to distinguish two error messages.

Signed-off-by: peng.wang@smartm.com <peng.wang@smartm.com>
common/cli_hush.c

index 6cff3b1..1467ff8 100644 (file)
@@ -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;