Skip to content

Commit

Permalink
Initialize pathSets
Browse files Browse the repository at this point in the history
to make scan-build happy.
  • Loading branch information
sebastinas committed Jun 28, 2022
1 parent 2658219 commit 78a0059
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions picnic3_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,12 @@ static unsigned int* getRevealedNodes(tree_t* tree, uint16_t* hideList, size_t h

/* pathSets[i][0...hideListSize] ~= pathSets[i * hideListSize + ...] stores the nodes in the path
* at depth i for each of the leaf nodes in hideListSize */
unsigned int* pathSets = malloc(hideListSize * pathLen * sizeof(unsigned int));
unsigned int* pathSets = calloc(hideListSize * pathLen, sizeof(unsigned int));

/* Compute the paths back to the root */
for (size_t i = 0; i < hideListSize; i++) {
unsigned int node =
hideList[i] +
(tree->numNodes - tree->numLeaves); /* input lists leaf indexes, translate to nodes */
/* input lists leaf indexes, translate to nodes */
unsigned int node = hideList[i] + (tree->numNodes - tree->numLeaves);
pathSets[/* 0 * hideListSize + */ i] = node;
unsigned int pos = 1;
while ((node = getParent(node)) != 0) {
Expand Down

0 comments on commit 78a0059

Please sign in to comment.