aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/mem_pool.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-16 15:03:03 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-12-16 15:03:03 +0000
commit4f2046a328ab700162adc63bd98c94a0c277d374 (patch)
tree5664470e0b621c5fdd213aa68d330219b512a809 /src/libutil/mem_pool.h
parentd4650b21e76684b52b5fe89da1071d1a11277811 (diff)
downloadrspamd-4f2046a328ab700162adc63bd98c94a0c277d374.tar.gz
rspamd-4f2046a328ab700162adc63bd98c94a0c277d374.zip
Use macro for tag and uid lengths instead of magic numbers
Diffstat (limited to 'src/libutil/mem_pool.h')
-rw-r--r--src/libutil/mem_pool.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libutil/mem_pool.h b/src/libutil/mem_pool.h
index f775746b3..dad095ec4 100644
--- a/src/libutil/mem_pool.h
+++ b/src/libutil/mem_pool.h
@@ -19,6 +19,8 @@
struct f_str_s;
+#define MEMPOOL_TAG_LEN 20
+#define MEMPOOL_UID_LEN 20
#define MEM_ALIGNMENT 16 /* Better for SSE */
#define align_ptr(p, a) \
(guint8 *) (((uintptr_t) (p) + ((uintptr_t) a - 1)) & ~((uintptr_t) a - 1))
@@ -85,8 +87,8 @@ struct _pool_destructors {
* Tag to use for logging purposes
*/
struct rspamd_mempool_tag {
- gchar tagname[20]; /**< readable name */
- gchar uid[20]; /**< unique id */
+ gchar tagname[MEMPOOL_TAG_LEN]; /**< readable name */
+ gchar uid[MEMPOOL_UID_LEN]; /**< unique id */
};
/**