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

Commit e6c9a5a

Browse files
committed
Fix mixup of bool and ternary value
Not currently a problem, but could be with stricter bool behavior under stdbool or C++. Reviewed-by: Andres Freund <andres@anarazel.de>
1 parent a071fe8 commit e6c9a5a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/access/gin/ginscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ ginFillScanKey(GinScanOpaque so, OffsetNumber attnum,
147147
key->nuserentries = nUserQueryValues;
148148

149149
key->scanEntry = (GinScanEntry *) palloc(sizeof(GinScanEntry) * nQueryValues);
150-
key->entryRes = (bool *) palloc0(sizeof(bool) * nQueryValues);
150+
key->entryRes = (GinTernaryValue *) palloc0(sizeof(GinTernaryValue) * nQueryValues);
151151

152152
key->query = query;
153153
key->queryValues = queryValues;

src/include/access/gin_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ typedef struct GinScanKeyData
281281
int nadditional;
282282

283283
/* array of check flags, reported to consistentFn */
284-
bool *entryRes;
284+
GinTernaryValue *entryRes;
285285
bool (*boolConsistentFn) (GinScanKey key);
286286
GinTernaryValue (*triConsistentFn) (GinScanKey key);
287287
FmgrInfo *consistentFmgrInfo;

0 commit comments

Comments
 (0)