extra_files: Fix uninitialized variable

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
This commit is contained in:
Otavio Pontes
2019-08-02 16:29:32 -07:00
committed by Castulo J. Martinez
parent d339feb172
commit 58360629cf
+3 -2
View File
@@ -155,11 +155,12 @@ enum swupd_code walk_tree(struct manifest *manifest, const char *start, bool fix
found->in_manifest = true;
}
}
int skip_len = 0; /* Length of directory name we are skipping
* could have used strlen(skip_dir), but speed! */
/* list files/directories which are extra.
* This is reverse so that files are removed before their parent dirs */
for (int i = nF - 1; i >= 0; i--) {
int skip_len; /* Length of directory name we are skipping
* could have used strlen(skip_dir), but speed! */
if (!F[i].in_manifest) {
/* Account for these files not in the manifest as inspected also */
counts->checked++;