mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r17748: make the casts much easier to understand
metze (This used to be commit 5992f3b918967ff478ad24333cfe583e0b14a4c9)
This commit is contained in:
parent
7a76b20d4f
commit
7852524532
@ -61,11 +61,11 @@ static int ldb_list_find(const void *needle,
|
||||
int r;
|
||||
|
||||
test_i = (min_i + max_i) / 2;
|
||||
r = comp_fn(needle, *(void * const *)(base_p + (size * test_i)));
|
||||
r = comp_fn(needle, (const void *)(base_p + (size * test_i)));
|
||||
if (r == 0) {
|
||||
/* scan back for first element */
|
||||
while (test_i > 0 &&
|
||||
comp_fn(needle, *(void * const *)(base_p + (size * (test_i-1)))) == 0) {
|
||||
comp_fn(needle, (const void *)(base_p + (size * (test_i-1)))) == 0) {
|
||||
test_i--;
|
||||
}
|
||||
return test_i;
|
||||
@ -81,7 +81,7 @@ static int ldb_list_find(const void *needle,
|
||||
}
|
||||
}
|
||||
|
||||
if (comp_fn(needle, *(void * const *)(base_p + (size * min_i))) == 0) {
|
||||
if (comp_fn(needle, (const void *)(base_p + (size * min_i))) == 0) {
|
||||
return min_i;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user