Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/eesh Modified Files: E.h comms.c Log Message: Assume free(0) is ok (if not HAVE_FREE_NULL_BUG will have to be defined). =================================================================== RCS file: /cvs/e/e16/e/eesh/E.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -3 -r1.26 -r1.27 --- E.h 29 Sep 2007 16:39:33 -0000 1.26 +++ E.h 23 Feb 2008 12:09:35 -0000 1.27 @@ -55,9 +55,13 @@ void Alert(const char *fmt, ...); #define Ecalloc calloc -#define Efree free #define Emalloc malloc #define Erealloc realloc +#if HAVE_FREE_NULL_BUG +#define Efree(p) if (p) free(p) +#else +#define Efree free +#endif #define EMALLOC(type, num) (type*)Emalloc((num)*sizeof(type)) #define EREALLOC(type, ptr, num) (type*)Erealloc(ptr, (num)*sizeof(type)) =================================================================== RCS file: /cvs/e/e16/e/eesh/comms.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- comms.c 29 Sep 2007 16:39:33 -0000 1.18 +++ comms.c 23 Feb 2008 12:09:35 -0000 1.19 @@ -190,7 +190,6 @@ if (!c) return; - if (c->msg) - Efree(c->msg); + Efree(c->msg); Efree(c); } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs