Potential fix for code scanning alert no. 374: Testing equality to None

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
superponible
2025-03-10 14:03:45 -05:00
committed by GitHub
co-authored by Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
parent 6061270816
commit e0168c7bec
@@ -74,7 +74,7 @@ def prefix_code_tree_add_leaf(treeNodes: List[PREFIX_CODE_NODE], leafIndex: int,
while bits > 1:
bits -= 1
childIndex = (mask >> bits) & 1
if node.child[childIndex] == None:
if node.child[childIndex] is None:
node.child[childIndex] = treeNodes[i]
treeNodes[i].leaf = False
i += 1