From c0e22c255c34bdc36fc5b9c59ee86bead93d8ebe Mon Sep 17 00:00:00 2001 From: goldsimon Date: Fri, 9 Oct 2009 20:18:15 +0000 Subject: [PATCH] Fixed default values of some stats to only be enabled if used Fixes bug #27338: sys_stats is defined when NO_SYS = 1 --- CHANGELOG | 4 ++++ src/include/lwip/opt.h | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 88146057..045ccffe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -43,6 +43,10 @@ HISTORY ++ Bugfixes: + 2009-10-09 Simon Goldschmidt + * opt.h: Fixed default values of some stats to only be enabled if used + Fixes bug #27338: sys_stats is defined when NO_SYS = 1 + 2009-08-30 Simon Goldschmidt * ip.c: Fixed bug bug #27345: "ip_frag() does not use the LWIP_NETIF_LOOPBACK function" by checking for loopback before calling ip_frag diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index da7fc56b..df62680b 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -1339,21 +1339,21 @@ * MEM_STATS==1: Enable mem.c stats. */ #ifndef MEM_STATS -#define MEM_STATS 1 +#define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) #endif /** * MEMP_STATS==1: Enable memp.c pool stats. */ #ifndef MEMP_STATS -#define MEMP_STATS 1 +#define MEMP_STATS (MEMP_MEM_MALLOC == 0) #endif /** * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). */ #ifndef SYS_STATS -#define SYS_STATS 1 +#define SYS_STATS (NO_SYS == 0) #endif #else