Skip to content

Commit fba08af

Browse files
committed
Fixed conditional jump or move depends on uninitialised value
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent e55124b commit fba08af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cf-check/diagnose.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ size_t diagnose_files(
615615

616616
if (symlink_target != NULL)
617617
{
618-
int usage;
618+
int usage = 0;
619619
bool needs_rotation = lmdb_file_needs_rotation(symlink_target, &usage);
620620
Log(LOG_LEVEL_INFO,
621621
"Status of '%s' -> '%s': %s [%d%% usage%s]\n",
@@ -627,7 +627,7 @@ size_t diagnose_files(
627627
}
628628
else
629629
{
630-
int usage;
630+
int usage = 0;
631631
bool needs_rotation = lmdb_file_needs_rotation(filename, &usage);
632632
Log(LOG_LEVEL_INFO,
633633
"Status of '%s': %s [%d%% usage%s]\n",

0 commit comments

Comments
 (0)