smbd: Simplify logic in remove_stale_share_mode_entries
authorVolker Lendecke <vl@samba.org>
Mon, 30 Jul 2018 11:21:26 +0000 (13:21 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 7 Sep 2018 15:26:18 +0000 (17:26 +0200)
To me, an early "continue" is easier to follow than a "else".

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/locking/locking.c

index e9bec6d763ec1af6dbf63c2c3004040887aa8325..91e32ced304f2fbfebf55a3b606a9edf3de7b9ad 100644 (file)
@@ -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;
        }
 }