From 595509a7f303852cd80617d97411ad3c0eaad2f8 Mon Sep 17 00:00:00 2001 From: Bernd Meyer Date: Wed, 29 Jul 2015 18:49:18 +1000 Subject: [PATCH] More sensible cjson realloc strategy. --- app/cjson/strbuf.h | 1 + app/include/user_config.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/cjson/strbuf.h b/app/cjson/strbuf.h index aa1f8c5d..38619b73 100644 --- a/app/cjson/strbuf.h +++ b/app/cjson/strbuf.h @@ -24,6 +24,7 @@ #include "c_stdlib.h" #include "c_stdarg.h" +#include "user_config.h" /* Size: Total bytes allocated to *buf * Length: String length, excluding optional NULL terminator. diff --git a/app/include/user_config.h b/app/include/user_config.h index 4be67347..f5d33fb9 100644 --- a/app/include/user_config.h +++ b/app/include/user_config.h @@ -68,4 +68,6 @@ #define LED_LOW_COUNT_DEFAULT 0 #endif +#define STRBUF_DEFAULT_INCREMENT 32 + #endif /* __USER_CONFIG_H__ */