aboutsummaryrefslogtreecommitdiff
path: root/lib/coverage.c
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2009-07-14 00:25:44 -0700
committerJustin Pettit <jpettit@nicira.com>2009-07-14 00:25:44 -0700
commite775da1437a9532765046baffdbc22d5252c0cc7 (patch)
tree3ec9edd1adceda169b21bc376da20dc1b6988ea6 /lib/coverage.c
parent923229363a32a793b7198819d141477b8522cf86 (diff)
Fix unitialized variable in coverage_log()
When providing the ability to force coverage printouts to occur, some code was moved around that allowed the "hash" variable to be used unitialized. This fixes that. Thanks to Ben for pointing out the problem. Bug #1577
Diffstat (limited to 'lib/coverage.c')
-rw-r--r--lib/coverage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coverage.c b/lib/coverage.c
index 6f805e9e..ba5d68d8 100644
--- a/lib/coverage.c
+++ b/lib/coverage.c
@@ -134,8 +134,8 @@ coverage_log(enum vlog_level level, bool suppress_dups)
return;
}
+ hash = coverage_hash();
if (suppress_dups) {
- hash = coverage_hash();
if (coverage_hit(hash)) {
VLOG(level, "Skipping details of duplicate event coverage for "
"hash=%08"PRIx32" in epoch %u", hash, epoch);