mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
t_bits alignment fix from Tatsuo Ishii
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.41 1998/09/01 04:26:39 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.42 1998/09/04 18:05:38 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The old interface functions have been converted to macros
|
||||
@ -809,7 +809,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
|
||||
int i;
|
||||
int numberOfAttributes = tupleDescriptor->natts;
|
||||
|
||||
len = sizeof *tuple - sizeof tuple->t_bits;
|
||||
len = offsetof(HeapTuple->t_bits);
|
||||
|
||||
for (i = 0; i < numberOfAttributes && !hasnull; i++)
|
||||
{
|
||||
@ -957,7 +957,7 @@ heap_addheader(uint32 natts, /* max domain index */
|
||||
|
||||
AssertArg(natts > 0);
|
||||
|
||||
len = sizeof(HeapTupleData) - sizeof(tup->t_bits);
|
||||
len = offsetof(HeapTuple->t_bits);
|
||||
|
||||
hoff = len = DOUBLEALIGN(len); /* be conservative */
|
||||
len += structlen;
|
||||
|
Reference in New Issue
Block a user