From 6d135e8444aa33de7818c730d5a71d4517dcbd4f Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Tue, 27 Mar 2018 17:43:37 -0500 Subject: [PATCH] xfs_scrub: initialize movon in xfs_scrub_connections Given the logic in xfs_scrub_connections, it's possible to fail all 3 tests and wind up checking an uninitialized moveon variable at the end. Start out with "true" to avoid this and move on even if all the conditions in the function are false. Fixes-coverity-id: 1433617 Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- scrub/phase5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrub/phase5.c b/scrub/phase5.c index 8e0a1be97..5f2a1a7cd 100644 --- a/scrub/phase5.c +++ b/scrub/phase5.c @@ -244,7 +244,7 @@ xfs_scrub_connections( { bool *pmoveon = arg; char descr[DESCR_BUFSZ]; - bool moveon; + bool moveon = true; xfs_agnumber_t agno; xfs_agino_t agino; int fd = -1; -- 2.47.2