mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
Fix header's size of structs defines in ispell.
This commit is contained in:
parent
e52f4ec325
commit
8605cfaa3d
@ -463,9 +463,9 @@ mkSPNode(IspellDict * Conf, int low, int high, int level)
|
||||
if (!nchar)
|
||||
return NULL;
|
||||
|
||||
rs = (SPNode *) malloc(SPNHRDSZ + nchar * sizeof(SPNodeData));
|
||||
rs = (SPNode *) malloc(SPNHDRSZ + nchar * sizeof(SPNodeData));
|
||||
MEMOUT(rs);
|
||||
memset(rs, 0, SPNHRDSZ + nchar * sizeof(SPNodeData));
|
||||
memset(rs, 0, SPNHDRSZ + nchar * sizeof(SPNodeData));
|
||||
rs->length = nchar;
|
||||
data = rs->data;
|
||||
|
||||
|
@ -27,7 +27,7 @@ typedef struct SPNode
|
||||
SPNodeData data[1];
|
||||
} SPNode;
|
||||
|
||||
#define SPNHRDSZ (sizeof(uint32))
|
||||
#define SPNHDRSZ (offsetof(SPNode,data))
|
||||
|
||||
|
||||
typedef struct spell_struct
|
||||
@ -89,7 +89,7 @@ typedef struct AffixNode
|
||||
AffixNodeData data[1];
|
||||
} AffixNode;
|
||||
|
||||
#define ANHRDSZ (sizeof(uint32))
|
||||
#define ANHRDSZ (offsetof(AffixNode, data))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user