[sr-dev] git:master:6857234c: core: reorder fields of struct _cfg_group for better alignment
Daniel-Constantin Mierla
miconda at gmail.com
Thu Nov 4 17:16:21 CET 2021
Module: kamailio
Branch: master
Commit: 6857234c321faf33573e1a034ab666dc158eb549
URL: https://github.com/kamailio/kamailio/commit/6857234c321faf33573e1a034ab666dc158eb549
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-11-04T17:15:49+01:00
core: reorder fields of struct _cfg_group for better alignment
---
Modified: src/core/cfg/cfg_struct.h
---
Diff: https://github.com/kamailio/kamailio/commit/6857234c321faf33573e1a034ab666dc158eb549.diff
Patch: https://github.com/kamailio/kamailio/commit/6857234c321faf33573e1a034ab666dc158eb549.patch
---
diff --git a/src/core/cfg/cfg_struct.h b/src/core/cfg/cfg_struct.h
index e03024e700..03f38f322d 100644
--- a/src/core/cfg/cfg_struct.h
+++ b/src/core/cfg/cfg_struct.h
@@ -76,7 +76,6 @@ enum { CFG_GROUP_UNKNOWN = 0, CFG_GROUP_DYNAMIC, CFG_GROUP_STATIC };
/*! \brief linked list of registered groups */
#pragma pack(push, 1)
typedef struct _cfg_group {
- int num; /*!< number of variables within the group */
cfg_mapping_t *mapping; /*!< describes the mapping betweeen
the cfg variable definition and the memory block */
char *vars; /*!< pointer to the memory block where the values
@@ -85,6 +84,7 @@ typedef struct _cfg_group {
cfg_add_var_t *add_var; /*!< Additional instances of the variables.
This linked list is used only before the config is
shmized. */
+ int num; /*!< number of variables within the group */
int size; /*!< size of the memory block that has to be
allocated to store the values */
int meta_offset; /*!< offset of the group within the
@@ -100,9 +100,9 @@ typedef struct _cfg_group {
to temporary set the handle in the main process and
restore it later to its original value. */
- unsigned char dynamic; /*!< indicates whether the variables within the group
- are dynamically allocated or not */
struct _cfg_group *next;
+ unsigned int dynamic; /*!< indicates whether the variables within the group
+ are dynamically allocated or not */
int name_len;
char name[1];
} cfg_group_t;
More information about the sr-dev
mailing list