aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2018-03-27 17:43:37 -0500
committerEric Sandeen <sandeen@redhat.com>2018-03-27 17:43:37 -0500
commit6d135e8444aa33de7818c730d5a71d4517dcbd4f (patch)
tree248267d944c0864bc558fafe9848bd6b2609cb7b
parent25992d9c1120ea9097dfb2c08bad2062ded2217d (diff)
downloadxfsprogs-dev-6d135e8444aa33de7818c730d5a71d4517dcbd4f.tar.gz
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 <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r--scrub/phase5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scrub/phase5.c b/scrub/phase5.c
index 8e0a1be974..5f2a1a7cd0 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;