Browse code

core: reorder fields of struct _cfg_group for better alignment

Daniel-Constantin Mierla authored on 04/11/2021 16:15:12
Showing 1 changed files
... ...
@@ -76,7 +76,6 @@ enum { CFG_GROUP_UNKNOWN = 0, CFG_GROUP_DYNAMIC, CFG_GROUP_STATIC };
76 76
 /*! \brief linked list of registered groups */
77 77
 #pragma pack(push, 1)
78 78
 typedef struct _cfg_group {
79
-	int		num;		/*!< number of variables within the group */
80 79
 	cfg_mapping_t	*mapping;	/*!< describes the mapping betweeen
81 80
 					the cfg variable definition and the memory block */
82 81
 	char		*vars;		/*!< pointer to the memory block where the values
... ...
@@ -85,6 +84,7 @@ typedef struct _cfg_group {
85 84
 	cfg_add_var_t	*add_var;	/*!< Additional instances of the variables.
86 85
 					This linked list is used only before the config is
87 86
 					shmized. */
87
+	int		num;		/*!< number of variables within the group */
88 88
 	int		size;		/*!< size of the memory block that has to be
89 89
 					allocated to store the values */
90 90
 	int		meta_offset;	/*!< offset of the group within the
... ...
@@ -100,9 +100,9 @@ typedef struct _cfg_group {
100 100
 					to temporary set the handle in the main process and
101 101
 					restore it later to its original value. */
102 102
 
103
-	unsigned char	dynamic;	/*!< indicates whether the variables within the group
104
-					are dynamically	allocated or not */
105 103
 	struct _cfg_group	*next;
104
+	unsigned int	dynamic;	/*!< indicates whether the variables within the group
105
+					are dynamically	allocated or not */
106 106
 	int		name_len;
107 107
 	char		name[1];
108 108
 } cfg_group_t;