Skip to content

Commit 674af42

Browse files
committed
Fix tainted downcast in RelationGetHypercoreInfo
1 parent a88106b commit 674af42

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tsl/src/hypercore/hypercore_handler.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,13 @@ lazy_build_hypercore_info_cache(Relation rel, bool create_chunk_constraints,
320320
HypercoreInfo *
321321
RelationGetHypercoreInfo(Relation rel)
322322
{
323-
/*coverity[tainted_data_downcast : FALSE]*/
324-
HypercoreInfo *info = rel->rd_amcache;
323+
HypercoreInfo *info;
325324

326-
if (NULL == info)
327-
info = rel->rd_amcache = lazy_build_hypercore_info_cache(rel, true, NULL);
325+
if (NULL == rel->rd_amcache)
326+
rel->rd_amcache = lazy_build_hypercore_info_cache(rel, true, NULL);
328327

329-
Assert(info && OidIsValid(info->compressed_relid));
328+
Assert(rel->rd_amcache && OidIsValid(((HypercoreInfo *) rel->rd_amcache)->compressed_relid));
329+
info = (HypercoreInfo *) rel->rd_amcache;
330330

331331
return info;
332332
}

0 commit comments

Comments
 (0)