]> source.dussan.org Git - rspamd.git/commitdiff
Use macro for tag and uid lengths instead of magic numbers
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 16 Dec 2015 15:03:03 +0000 (15:03 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 16 Dec 2015 15:03:03 +0000 (15:03 +0000)
src/libutil/mem_pool.h

index f775746b3ec74968c6013e7445ab3eae83ca4e27..dad095ec46b21b974b19263b8c629e5050c75ad5 100644 (file)
@@ -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                                                          */
 };
 
 /**