1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

dsdb: Quiet CID 1452117 1452119 1452114 (STRAY_SEMICOLON)

Try to make clear what is being done here, we are trying to count the partitions so that
we can then walk them in reverse.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2019-07-31 12:08:58 +12:00
parent 0c001a7bf6
commit 1a7f2a230d

View File

@ -1185,7 +1185,10 @@ int partition_end_trans(struct ldb_module *module)
* partition_start_trans. See comment in that function for detail.
*/
if (data && data->partitions) {
for (i=0; data->partitions[i]; i++);;
/* Just counting the partitions */
for (i=0; data->partitions[i]; i++) {}
/* now walk them backwards */
for (i--; i>=0; i--) {
struct dsdb_partition *p = data->partitions[i];
if (trace) {
@ -1241,7 +1244,10 @@ int partition_del_trans(struct ldb_module *module)
* partition_start_trans. See comment in that function for detail.
*/
if (data->partitions) {
for (i=0; data->partitions[i]; i++);;
/* Just counting the partitions */
for (i=0; data->partitions[i]; i++) {}
/* now walk them backwards */
for (i--; i>=0; i--) {
struct dsdb_partition *p = data->partitions[i];
if (trace) {
@ -1595,7 +1601,10 @@ int partition_read_unlock(struct ldb_module *module)
* partition_start_trans. See comment in that function for detail.
*/
if (data && data->partitions) {
for (i=0; data->partitions[i]; i++);;
/* Just counting the partitions */
for (i=0; data->partitions[i]; i++) {}
/* now walk them backwards */
for (i--; i>=0; i--) {
struct dsdb_partition *p = data->partitions[i];
if (trace) {