mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r442: fixed some uninitialised variables pointed out by gcc -O3
(This used to be commit ff31cfb941
)
This commit is contained in:
parent
9c92ac995d
commit
585d87a959
@ -73,14 +73,13 @@ int list_find(const void *needle,
|
||||
max_i = nmemb-1;
|
||||
|
||||
while (min_i < max_i) {
|
||||
size_t test_t;
|
||||
int r;
|
||||
|
||||
test_i = (min_i + max_i) / 2;
|
||||
r = comp_fn(needle, *(void * const *)(base_p + (size * test_i)));
|
||||
if (r == 0) {
|
||||
/* scan back for first element */
|
||||
while (test_t > 0 &&
|
||||
while (test_i > 0 &&
|
||||
comp_fn(needle, *(void * const *)(base_p + (size * (test_i-1)))) == 0) {
|
||||
test_i--;
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ static int ltdb_index_dn(struct ldb_context *ldb,
|
||||
const struct ldb_message *index_list,
|
||||
struct dn_list *list)
|
||||
{
|
||||
int ret;
|
||||
int ret = -1;
|
||||
|
||||
switch (tree->operation) {
|
||||
case LDB_OP_SIMPLE:
|
||||
|
@ -52,7 +52,7 @@ static void usage(void)
|
||||
static int process_file(struct ldb_context *ldb, FILE *f)
|
||||
{
|
||||
struct ldb_ldif *ldif;
|
||||
int ret, count = 0;
|
||||
int ret = -1, count = 0;
|
||||
|
||||
while ((ldif = ldif_read_file(f))) {
|
||||
switch (ldif->changetype) {
|
||||
|
Loading…
Reference in New Issue
Block a user