journal: fix uninitialized variable use

If the journal file being processed is archivied, seqnum_id will not be
initialized before being passed on, and coverity complains.
Initialize it to zero.

CID #1453235
This commit is contained in:
Luca Boccassi 2021-05-20 10:35:36 +01:00
parent f144f6faa9
commit 06a368e819

View file

@ -206,6 +206,9 @@ int journal_directory_vacuum(
} else if (endswith(de->d_name, ".journal~")) {
unsigned long long tmp;
/* seqnum_id won't be initialised before use below, so set to 0 */
seqnum_id = SD_ID128_NULL;
/* Vacuum corrupted files */
if (q < 1 + 16 + 1 + 16 + 8 + 1) {