Skip to content

Commit bb1e5ed

Browse files
committed
Improved code [skip ci]
1 parent 8801832 commit bb1e5ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hnswutils.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,6 @@ HnswUpdateConnection(HnswElement element, HnswCandidate * hc, int m, int lc, int
854854
{
855855
/* Shrink connections */
856856
HnswCandidate *pruned = NULL;
857-
List *c = NIL;
858857

859858
/* Load elements on insert */
860859
if (index != NULL)
@@ -881,6 +880,8 @@ HnswUpdateConnection(HnswElement element, HnswCandidate * hc, int m, int lc, int
881880

882881
if (pruned == NULL)
883882
{
883+
List *c = NIL;
884+
884885
/* Add and sort candidates */
885886
for (int i = 0; i < currentNeighbors->length; i++)
886887
c = lappend(c, &currentNeighbors->items[i]);

0 commit comments

Comments
 (0)