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