zlib: fix code when DEBUG is defined
PATCH v3 1/1 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 <[email protected]>
--- lib_generic/zlib.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
lib_generic/zlib.c +3 -2
@@ -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
Signature · 1 line
1.6.0.6
Wolfgang Denk
AppliedPATCH v3 1/1 zlib: fix code when DEBUG is defined
Dear Giuseppe CONDORELLI,
Quoted 7 lines · In message <[email protected]> you…
Removed
stdio.hinclusion and moved trace macros to use printf avoiding to write debug informations to standard error.Signed-off-by Giuseppe Condorelli <[email protected]>--- lib_generic/zlib.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 9 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de It took him several minutes to understand any new idea put to him, and this is a very valuable trait in a leader, because anything any- one is still trying to explain to you after two minutes is probably important and anything they give up after a mere minute or so is al- most certainly something they shouldn't have been bothering you with in the first place. - Terry Pratchett, _Reaper Man_