[SCM] Samba Shared Repository - branch master updated
Garming Sam
garming at samba.org
Wed Mar 30 12:27:07 UTC 2016
The branch, master has been updated
via 9efb5bb VLV: avoid name conflict with string.h's index()
from a7a77e2 tdb: avoid a race condition when checking for robust mutexes
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9efb5bb8aef46d04f8016820cd152b65794cbd11
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Wed Mar 23 10:54:01 2016 +1300
VLV: avoid name conflict with string.h's index()
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Garming Sam <garming at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Garming Sam <garming at samba.org>
Autobuild-Date(master): Wed Mar 30 14:26:51 CEST 2016 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
source4/dsdb/samdb/ldb_modules/vlv_pagination.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/dsdb/samdb/ldb_modules/vlv_pagination.c b/source4/dsdb/samdb/ldb_modules/vlv_pagination.c
index 5ae6659..34da5c2 100644
--- a/source4/dsdb/samdb/ldb_modules/vlv_pagination.c
+++ b/source4/dsdb/samdb/ldb_modules/vlv_pagination.c
@@ -332,7 +332,7 @@ static int vlv_results(struct vlv_context *ac)
int ret, i, first_i, last_i;
struct ldb_vlv_req_control *vlv_details;
struct ldb_server_sort_control *sort_details;
- int index = 0;
+ int target = 0;
struct ldb_context *ldb = NULL;
if (ac->store == NULL) {
@@ -355,22 +355,22 @@ static int vlv_results(struct vlv_context *ac)
sort_details = ac->store->sort_details;
if (vlv_details->type == 1) {
- index = vlv_gt_eq_to_index(ac, ac->store->results, vlv_details,
- sort_details, &ret);
+ target = vlv_gt_eq_to_index(ac, ac->store->results, vlv_details,
+ sort_details, &ret);
if (ret != LDB_SUCCESS) {
return ret;
}
} else {
- index = vlv_calc_real_offset(vlv_details->match.byOffset.offset,
- vlv_details->match.byOffset.contentCount,
- ac->store->num_entries);
- if (index == -1) {
+ target = vlv_calc_real_offset(vlv_details->match.byOffset.offset,
+ vlv_details->match.byOffset.contentCount,
+ ac->store->num_entries);
+ if (target == -1) {
return LDB_ERR_OPERATIONS_ERROR;
}
}
/* send the results */
- first_i = MAX(index - vlv_details->beforeCount, 0);
- last_i = MIN(index + vlv_details->afterCount, ac->store->num_entries - 1);
+ first_i = MAX(target - vlv_details->beforeCount, 0);
+ last_i = MIN(target + vlv_details->afterCount, ac->store->num_entries - 1);
for (i = first_i; i <= last_i; i++) {
struct ldb_result *result;
@@ -446,8 +446,8 @@ static int vlv_results(struct vlv_context *ac)
vlv->ctxid_len = sizeof(uint32_t);
vlv->vlv_result = 0;
vlv->contentCount = ac->store->num_entries;
- if (index >= 0) {
- vlv->targetPosition = index + 1;
+ if (target >= 0) {
+ vlv->targetPosition = target + 1;
} else if (vlv_details->type == 1) {
vlv->targetPosition = ac->store->num_entries + 1;
} else {
--
Samba Shared Repository
More information about the samba-cvs
mailing list