public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] zlib: fix code when DEBUG is defined
@ 2009-09-03  9:30 Giuseppe CONDORELLI
  2009-09-03  8:26 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Giuseppe CONDORELLI @ 2009-09-03  9:30 UTC (permalink / raw)
  To: u-boot

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>
---
 lib_generic/zlib.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib_generic/zlib.c b/lib_generic/zlib.c
index 1b6db32..25ae88f 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,6 @@ void z_error (m)
     char *m;
 {
 	fprintf(stderr, "%s\n", m);
-	exit(1);
 }
 #endif
 
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-03 10:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03  9:30 [U-Boot] [PATCH v2] zlib: fix code when DEBUG is defined Giuseppe CONDORELLI
2009-09-03  8:26 ` Wolfgang Denk
2009-09-03  9:41   ` Giuseppe CONDORELLI
2009-09-03 10:09     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox