浏览代码

Fix coverity cid 1405510

This is a false positive, but let's appease coverity.
Sebastian Hahn 7 年之前
父节点
当前提交
ee478bdf38
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/or/consdiffmgr.c

+ 4 - 0
src/or/consdiffmgr.c

@@ -666,6 +666,10 @@ consdiffmgr_validate(void)
     if (r < 0)
       continue;
 
+    // Deconfuse coverity about the possibility of sha3_received being
+    // uninitialized
+    tor_assert(r <= 0);
+
     if (fast_memneq(sha3_received, sha3_expected, DIGEST256_LEN)) {
       problems = 1;
       consensus_cache_entry_mark_for_removal(obj);