--------------------- PatchSet 1644 Date: 2005/09/01 22:56:02 Author: dwsquid Branch: squid3-icap Tag: (none) Log: When USE_LEAKFINDER is not defined, define an empty LeakFinder class. Also fix macro parameters. Members: src/LeakFinder.h:1.1.2.2->1.1.2.3 Index: squid3/src/LeakFinder.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/LeakFinder.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid3/src/LeakFinder.h 1 Sep 2005 18:36:03 -0000 1.1.2.2 +++ squid3/src/LeakFinder.h 1 Sep 2005 22:56:02 -0000 1.1.2.3 @@ -5,9 +5,9 @@ #define SQUID_LEAKFINDER_H #if USE_LEAKFINDER -#define leakAdd(p,l) l->add(p,__FILE__,__LINE__) -#define leakTouch(p,l) l->touch(p,__FILE__,__LINE__) -#define leakFree(p,l) l->free(p,__FILE__,__LINE__) +#define leakAdd(p,l) if (l) l->add(p,__FILE__,__LINE__) +#define leakTouch(p,l) if (l) l->touch(p,__FILE__,__LINE__) +#define leakFree(p,l) if (l) l->free(p,__FILE__,__LINE__) class LeakFinderPtr : public hash_link { @@ -48,9 +48,10 @@ }; #else /* USE_LEAKFINDER */ -#define leakAdd(p) p -#define leakTouch(p) p -#define leakFree(p) p +class LeakFinderPtr {}; +#define leakAdd(p,l) p +#define leakTouch(p,l) p +#define leakFree(p,l) p #endif /* USE_LEAKFINDER */ #endif /* SQUID_LEAKFINDER_H */