Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4b814b1

Browse files
committed
offsetof cleanup.
1 parent f93281a commit 4b814b1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/backend/access/common/heaptuple.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.42 1998/09/04 18:05:38 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.43 1998/09/04 18:21:10 momjian Exp $
1212
*
1313
* NOTES
1414
* The old interface functions have been converted to macros
@@ -809,7 +809,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
809809
int i;
810810
int numberOfAttributes = tupleDescriptor->natts;
811811

812-
len = offsetof(HeapTuple->t_bits);
812+
len = offsetof(HeapTupleData, t_bits);
813813

814814
for (i = 0; i < numberOfAttributes && !hasnull; i++)
815815
{
@@ -957,7 +957,7 @@ heap_addheader(uint32 natts, /* max domain index */
957957

958958
AssertArg(natts > 0);
959959

960-
len = offsetof(HeapTuple->t_bits);
960+
len = offsetof(HeapTupleData, t_bits);
961961

962962
hoff = len = DOUBLEALIGN(len); /* be conservative */
963963
len += structlen;

src/backend/storage/large_object/inv_api.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.39 1998/09/04 18:05:39 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.40 1998/09/04 18:21:11 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -917,7 +917,7 @@ inv_wrold(LargeObjectDesc *obj_desc,
917917
/*
918918
ntup = inv_newtuple(obj_desc, newbuf, newpage, (char *) NULL, tupbytes);
919919
dptr = ((char *) ntup) + ntup->t_hoff -
920-
(sizeof(HeapTupleData) - offsetof(HeapTupleData.t_bits)) +
920+
(sizeof(HeapTupleData) - offsetof(HeapTupleData, t_bits)) +
921921
sizeof(int4)
922922
+ sizeof(fsblock->vl_len);
923923
@@ -998,7 +998,7 @@ inv_newtuple(LargeObjectDesc *obj_desc,
998998
char *attptr;
999999

10001000
/* compute tuple size -- no nulls */
1001-
hoff = offsetof(HeapTuple->t_bits);
1001+
hoff = offsetof(HeapTupleData, t_bits);
10021002

10031003
/* add in olastbyte, varlena.vl_len, varlena.vl_dat */
10041004
tupsize = hoff + (2 * sizeof(int32)) + nwrite;

0 commit comments

Comments
 (0)