diff options
Diffstat (limited to 'nscd/connections.c')
-rw-r--r-- | nscd/connections.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nscd/connections.c b/nscd/connections.c index 2572a42ee7..26d75d2978 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -378,8 +378,9 @@ verify_persistent_db (void *mem, struct database_pers_head *readhead, int dbnr) nscd_ssize_t he_cnt = 0; for (nscd_ssize_t cnt = 0; cnt < head->module; ++cnt) { - ref_t first = head->array[cnt]; - ref_t work = first; + ref_t trail = head->array[cnt]; + ref_t work = trail; + int tick = 0; while (work != ENDREF) { @@ -439,9 +440,12 @@ verify_persistent_db (void *mem, struct database_pers_head *readhead, int dbnr) work = here->next; - if (work == first) + if (work == trail) /* A circular list, this must not happen. */ goto fail; + if (tick) + trail = ((struct hashentry *) (data + trail))->next; + tick = 1 - tick; } } |