From: Volker Lendecke Date: Mon, 30 Jul 2018 11:21:26 +0000 (+0200) Subject: smbd: Simplify logic in remove_stale_share_mode_entries X-Git-Tag: tdb-1.3.17~1682 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6be25d5683d5fbfddab4f22c4dbe6299969d1978;p=thirdparty%2Fsamba.git smbd: Simplify logic in remove_stale_share_mode_entries To me, an early "continue" is easier to follow than a "else". Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/locking/locking.c b/source3/locking/locking.c index e9bec6d763e..91e32ced304 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -805,9 +805,9 @@ void remove_stale_share_mode_entries(struct share_mode_data *d) struct share_mode_entry *m = d->share_modes; m[i] = m[d->num_share_modes-1]; d->num_share_modes -= 1; - } else { - i += 1; + continue; } + i += 1; } }