]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-recoverd/vacuum: slightly reorder the vacuum fetch loop
authorMichael Adam <obnox@samba.org>
Tue, 2 Jun 2015 20:16:17 +0000 (22:16 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 5 Jun 2015 09:28:23 +0000 (11:28 +0200)
Reads more naturally this way, imho.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_recoverd.c

index 51dcdcd3943bada6671fd72e4cf2227e8e953723..e5a4a401e15b954d143f003c7d4b7ce0383c9771 100644 (file)
@@ -1080,13 +1080,14 @@ static void vacuum_fetch_next(struct vacuum_info *v)
                bool ok;
 
                r = v->r;
-               v->r = (struct ctdb_rec_data *)(r->length + (uint8_t *)r);
-               v->recs->count--;
 
                ok = vacuum_fetch_process_one(v->ctdb_db, v->rec->ctdb->pnn, r);
                if (!ok) {
                        break;
                }
+
+               v->r = (struct ctdb_rec_data *)(r->length + (uint8_t *)r);
+               v->recs->count--;
        }
 
        talloc_free(v);