pgvector.git / summary / log / commit / refs

commit    548f6fcfd3c877a0bb55903f36282e3f3a53d0d7
Author:   Andrew Kane <andrew@ankane.org>
Date:     Thu Oct 22 03:19:06 2026 +0000

    Switched to struct initialization [skip ci]


src/hnsw.c | 4 +--- src/ivfflat.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/hnsw.c b/src/hnsw.c index c4dae475..a2f481de 100644 --- a/src/hnsw.c +++ b/src/hnsw.c @@ -146,7 +146,7 @@ hnswcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, Selectivity *indexSelectivity, double *indexCorrelation, double *indexPages) { - GenericCosts costs; + GenericCosts costs = {0}; int m; double ratio; double startupPages; @@ -168,8 +168,6 @@ hnswcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, return; } - MemSet(&costs, 0, sizeof(costs)); - genericcostestimate(root, path, loop_count, &costs); index = index_open(path->indexinfo->indexoid, NoLock); diff --git a/src/ivfflat.c b/src/ivfflat.c index a4a9399f..a7f383e1 100644 --- a/src/ivfflat.c +++ b/src/ivfflat.c @@ -97,7 +97,7 @@ ivfflatcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, Selectivity *indexSelectivity, double *indexCorrelation, double *indexPages) { - GenericCosts costs; + GenericCosts costs = {0}; int lists; double ratio; double sequentialRatio = 0.5; @@ -120,8 +120,6 @@ ivfflatcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, return; } - MemSet(&costs, 0, sizeof(costs)); - genericcostestimate(root, path, loop_count, &costs); index = index_open(path->indexinfo->indexoid, NoLock); [parent: 817e5f6fba66]