summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/changelog/src/changelog-rpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/features/changelog/src/changelog-rpc.c b/xlators/features/changelog/src/changelog-rpc.c
index 4bc24203118..1d10eccf84f 100644
--- a/xlators/features/changelog/src/changelog-rpc.c
+++ b/xlators/features/changelog/src/changelog-rpc.c
@@ -18,7 +18,7 @@ static void
changelog_cleanup_dispatchers (xlator_t *this,
changelog_priv_t *priv, int count)
{
- for (; count >= 0; count--) {
+ for (count--; count >= 0; count--) {
(void) changelog_thread_cleanup
(this, priv->ev_dispatcher[count]);
}
@@ -112,7 +112,7 @@ changelog_init_rpc_threads (xlator_t *this, changelog_priv_t *priv,
ret = pthread_create (&priv->ev_dispatcher[j],
NULL, changelog_ev_dispatch, conn);
if (ret != 0) {
- changelog_cleanup_dispatchers (this, priv, --j);
+ changelog_cleanup_dispatchers (this, priv, j);
break;
}
}