diff --git a/source/libs/tdb/src/db/tdbBtree.c b/source/libs/tdb/src/db/tdbBtree.c index 40ba6a0ee9d52e2f9158277100ffde28810f9403..4188985d0f4175b28d98adf10bdb0b9b3d146874 100644 --- a/source/libs/tdb/src/db/tdbBtree.c +++ b/source/libs/tdb/src/db/tdbBtree.c @@ -357,8 +357,8 @@ static int tdbBtreeZeroPage(SPage *pPage, void *arg) { // Init the page header pPage->pPageHdr->flags = flags; pPage->pPageHdr->nCells = 0; - pPage->pPageHdr->cellCont = pBt->pageSize; - pPage->pPageHdr->freeCell = 0; + pPage->pPageHdr->cCells = pBt->pageSize; + pPage->pPageHdr->fCell = 0; pPage->pPageHdr->nFree = 0; TDB_BTREE_ASSERT_FLAG(flags); diff --git a/source/libs/tdb/src/inc/tdbPage.h b/source/libs/tdb/src/inc/tdbPage.h index 0c62b88626c4479243322283054b49bd42fafb1f..531651ccc704bb8f1c050b1ad6574faeb5c7bbfe 100644 --- a/source/libs/tdb/src/inc/tdbPage.h +++ b/source/libs/tdb/src/inc/tdbPage.h @@ -26,8 +26,8 @@ typedef u8 SCell; typedef struct __attribute__((__packed__)) { u16 flags; u16 nCells; - u16 cellCont; - u16 freeCell; + u16 cCells; + u16 fCell; u16 nFree; } SPageHdr; @@ -35,8 +35,8 @@ typedef struct __attribute__((__packed__)) { typedef struct __attribute__((__packed__)) { u16 flags; u8 nCells[3]; - u8 cellCont[3]; - u8 freeCell[3]; + u8 cCells[3]; + u8 fCell[3]; u8 nFree[3]; } SLPageHdr; @@ -85,7 +85,7 @@ struct SPage { }) /* For page */ -#define TDB_PAGE_FLAGS(pPage) (TDB_IS_LARGE_PAGE(pPage) ? TDB_LPAGE_FLAGS(pPage)) : TDB_SPAGE_FLAGS(pPage)) +#define TDB_PAGE_FLAGS(pPage) (TDB_IS_LARGE_PAGE(pPage) ? TDB_LPAGE_FLAGS(pPage)) : TDB_SPAGE_FLAGS(pPage)) #define TDB_PAGE_CELL_OFFSET_AT(pPage, idx) \ (((pPage)->szOffset == 2) ? ((u16 *)((pPage)->aCellIdx))[idx] \ : ((pPage)->aCellIdx[idx * 3] * 65536 + *(u16 *)((pPage)->aCellIdx + idx * 3 + 1)))