|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From e8c108ca9f11a382742f212f5b42a02536b3d40f Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Philippe De Swert <philippedeswert@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Wed, 17 Sep 2014 00:27:16 +0300
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] journal: Do not count on the compiler initializing found_last
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
to false
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
There is a very unlikely case where this can happen since gcc usually
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
does the sane thing. But let's make sure found_last is initialized anyway.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Fixes: CID#996386
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/journal/journal-verify.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 6c8ca8c268..b4e8f73c41 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/journal/journal-verify.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/journal/journal-verify.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -804,7 +804,7 @@ int journal_file_verify(
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
usec_t last_usec = 0;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
int data_fd = -1, entry_fd = -1, entry_array_fd = -1;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
unsigned i;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- bool found_last;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ bool found_last = false;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
#ifdef HAVE_GCRYPT
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
uint64_t last_tag = 0;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
#endif
|