tdb: rework cleanup logic in tdb_runtime_check_for_robust_mutexes()
authorUri Simchoni <uri@samba.org>
Tue, 29 Mar 2016 18:36:17 +0000 (21:36 +0300)
committerRalph Boehme <slow@samba.org>
Mon, 11 Apr 2016 13:22:26 +0000 (15:22 +0200)
commitef3d837040f330a98f5bf4856af5a35a6de74616
treed52799a9d0fe3e0953438c94664ef892385311e1
parent3e2af1568d150de1cb12fef40580f4880ac787ff
tdb: rework cleanup logic in tdb_runtime_check_for_robust_mutexes()

The cleanup logic used six goto lables, at least I'm not able to make
sane modifications to such a beast.

By using state flags that track which objects are initialized and need
cleanup, we get rid of the goto labels. It comes at a cost though: you
have to be careful to correctly set the cleanup flags.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
lib/tdb/common/mutex.c