diff options
author | Giuseppe CONDORELLI <giuseppe.condorelli@st.com> | 2009-09-03 07:37:46 -0400 |
---|---|---|
committer | Tom Rix <Tom.Rix@windriver.com> | 2009-10-03 09:04:14 -0500 |
commit | aa0c9e34d5ab869b3e1ca1fea56b79d458f1a22f (patch) | |
tree | 9be5b840950623a511aff0b543e4ab148c3a1760 /lib_generic | |
parent | 897e6d063da8f4fa6d50d9942f911b107e00915f (diff) | |
download | u-boot-imx-aa0c9e34d5ab869b3e1ca1fea56b79d458f1a22f.zip u-boot-imx-aa0c9e34d5ab869b3e1ca1fea56b79d458f1a22f.tar.gz u-boot-imx-aa0c9e34d5ab869b3e1ca1fea56b79d458f1a22f.tar.bz2 |
zlib: fix code when DEBUG is defined
Removed stdio.h inclusion and moved trace macros to use printf avoiding to
write debug informations to standard error.
Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
Diffstat (limited to 'lib_generic')
-rw-r--r-- | lib_generic/zlib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib_generic/zlib.c b/lib_generic/zlib.c index 1b6db32..8fe3bd0 100644 --- a/lib_generic/zlib.c +++ b/lib_generic/zlib.c @@ -27,6 +27,7 @@ #define ZLIB_INTERNAL #include "u-boot/zlib.h" +#include <common.h> /* To avoid a build time warning */ #ifdef STDC #include <malloc.h> @@ -83,10 +84,10 @@ typedef unsigned long ulg; /* Diagnostic functions */ #ifdef DEBUG -#include <stdio.h> extern int z_verbose; extern void z_error OF((char *m)); #define Assert(cond,msg) {if(!(cond)) z_error(msg);} +#define fprintf(fp,...) printf(__VA_ARGS__) #define Trace(x) {if (z_verbose>=0) fprintf x ;} #define Tracev(x) {if (z_verbose>0) fprintf x ;} #define Tracevv(x) {if (z_verbose>1) fprintf x ;} @@ -2000,7 +2001,7 @@ void z_error (m) char *m; { fprintf(stderr, "%s\n", m); - exit(1); + hang (); } #endif |