diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2007-09-11 13:04:53 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2007-09-11 13:04:53 +0000 |
commit | 71760652731235918cf878be7d0b8e6bb8c6b1ec (patch) | |
tree | 9c232cabc757ee9b321fefa49bbcdd9f6d02fd03 | |
parent | 8f11bb191963026db6904e66c8fcf94bcd15ca51 (diff) | |
download | postgresql-71760652731235918cf878be7d0b8e6bb8c6b1ec.tar.gz postgresql-71760652731235918cf878be7d0b8e6bb8c6b1ec.zip |
Fix header's size of structs defines in ispell.
-rw-r--r-- | contrib/tsearch2/ispell/spell.c | 4 | ||||
-rw-r--r-- | contrib/tsearch2/ispell/spell.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/contrib/tsearch2/ispell/spell.c b/contrib/tsearch2/ispell/spell.c index c14012a6e73..4d83532f502 100644 --- a/contrib/tsearch2/ispell/spell.c +++ b/contrib/tsearch2/ispell/spell.c @@ -671,9 +671,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; diff --git a/contrib/tsearch2/ispell/spell.h b/contrib/tsearch2/ispell/spell.h index 50a5947680e..2b79f455a30 100644 --- a/contrib/tsearch2/ispell/spell.h +++ b/contrib/tsearch2/ispell/spell.h @@ -29,7 +29,7 @@ typedef struct SPNode SPNodeData data[1]; } SPNode; -#define SPNHRDSZ (sizeof(uint32)) +#define SPNHDRSZ (offsetof(SPNode,data)) typedef struct spell_struct @@ -93,7 +93,7 @@ typedef struct AffixNode AffixNodeData data[1]; } AffixNode; -#define ANHRDSZ (sizeof(uint32)) +#define ANHRDSZ (offsetof(AffixNode, data)) typedef struct { |