From cac858cb244271a1d31dc377f3314dd1c7bbeff0 Mon Sep 17 00:00:00 2001 From: Konrad Date: Mon, 4 Dec 2023 14:35:29 +0100 Subject: [PATCH] dataman: use correct size for dataman compat key --- src/modules/dataman/dataman.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/dataman/dataman.h b/src/modules/dataman/dataman.h index 49fd036aec..036bc74f4f 100644 --- a/src/modules/dataman/dataman.h +++ b/src/modules/dataman/dataman.h @@ -93,11 +93,15 @@ static const unsigned g_per_item_max_index[DM_KEY_NUM_KEYS] = { DM_KEY_COMPAT_MAX }; +struct dataman_compat_s { + uint64_t key; +}; + constexpr uint32_t MISSION_SAFE_POINT_SIZE = sizeof(struct mission_item_s); constexpr uint32_t MISSION_FENCE_POINT_SIZE = sizeof(struct mission_fence_point_s); constexpr uint32_t MISSION_ITEM_SIZE = sizeof(struct mission_item_s); constexpr uint32_t MISSION_SIZE = sizeof(struct mission_s); -constexpr uint32_t DATAMAN_COMPAT_SIZE = sizeof(struct mission_s); +constexpr uint32_t DATAMAN_COMPAT_SIZE = sizeof(struct dataman_compat_s); /** The table of the size of each item type */ static constexpr size_t g_per_item_size[DM_KEY_NUM_KEYS] = { @@ -109,10 +113,6 @@ static constexpr size_t g_per_item_size[DM_KEY_NUM_KEYS] = { DATAMAN_COMPAT_SIZE }; -struct dataman_compat_s { - uint64_t key; -}; - /* increment this define whenever a binary incompatible change is performed */ #define DM_COMPAT_VERSION 4ULL