master - coverity: move declaration out of the loop
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b4c69320fcccaf5257039c3489d5227e82183f8a Commit: b4c69320fcccaf5257039c3489d5227e82183f8a Parent: f2d0eefa770468e8cdd126ce09a251bdf804884e Author: Zdenek Kabelac <[email protected]> AuthorDate: Sat Mar 17 13:57:40 2018 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Sat Mar 17 23:33:58 2018 +0100
coverity: move declaration out of the loop
Move declaration of count counter outside the while loop.
--- daemons/cmirrord/cluster.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
daemons/cmirrord/cluster.c +1 -2
@@ -166,6 +166,7 @@ int cluster_send(struct clog_request *rq) {int r;int found =0 ; +int count =0 ;struct iovec iov;struct clog_cpg *entry;
@@ -203,8 +204,6 @@ int cluster_send(struct clog_request *rq) #if CMIRROR_HAS_CHECKPOINT do { - int count = 0; - r = cpg_mcast_joined(entry->handle, CPG_TYPE_AGREED, &iov, 1); if (r != SA_AIS_ERR_TRY_AGAIN) break;