From b9d8188dba981d950a157ac774fd9d78f7a1eba3 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sat, 11 Jul 2015 07:15:23 +0200 Subject: [PATCH] add some debug messages --- hermit/newlib/examples/jacobi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hermit/newlib/examples/jacobi.c b/hermit/newlib/examples/jacobi.c index 797141011..777ff69cc 100644 --- a/hermit/newlib/examples/jacobi.c +++ b/hermit/newlib/examples/jacobi.c @@ -45,13 +45,17 @@ static int generate_empty_matrix(double*** A , unsigned int N) { *A = (double**) malloc((N+1)*sizeof(double*)); - if (*A == NULL) - return -2; /* Error */ + if (*A == NULL) { + printf("*A is NULL...\n"); + return -1; /* Error */ + } (*A)[0] = (double*) malloc((N+1)*N*sizeof(double)); - if (**A == NULL) + if (**A == NULL) { + printf("**A is NULL...\n"); return -2; /* Error */ + } for(iCnt=1; iCnt