mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-02 21:19:53 -05:00
bvlist *list was updated through the wrong type.
This commit is contained in:
parent
0cc537e6f1
commit
ca615a4b3a
1 changed files with 3 additions and 4 deletions
|
|
@ -388,7 +388,7 @@ static int r_enum_tree(enumCookie *ck, struct berval *path,
|
|||
while(1) {
|
||||
struct berval fname, itmp;
|
||||
struct dirent * dir;
|
||||
bvlist *bvl, *prev;
|
||||
bvlist *bvl, **prev;
|
||||
|
||||
dir = readdir(dir_of_path);
|
||||
if(dir == NULL) break; /* end of the directory */
|
||||
|
|
@ -416,15 +416,14 @@ static int r_enum_tree(enumCookie *ck, struct berval *path,
|
|||
}
|
||||
}
|
||||
|
||||
for (ptr = list, prev = (bvlist *)&list; ptr;
|
||||
prev = ptr, ptr = ptr->next) {
|
||||
for (prev = &list; (ptr = *prev) != NULL; prev = &ptr->next) {
|
||||
int cmp = strcmp( bvl->bv.bv_val, ptr->bv.bv_val );
|
||||
if ( !cmp && bvl->num.bv_val )
|
||||
cmp = bvl->inum - ptr->inum;
|
||||
if ( cmp < 0 )
|
||||
break;
|
||||
}
|
||||
prev->next = bvl;
|
||||
*prev = bvl;
|
||||
bvl->next = ptr;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue