/* qdict_next(): Return next qdict entry in an iteration.  */
const QDictEntry* qdict_next(const QDict *qdict, const QDictEntry *entry)
/* qdict_next(): Return next qdict entry in an iteration.  */
const QDictEntry* qdict_next(const QDict *qdict, const QDictEntry *entry)
{
    QDictEntry *ret;
    ret = QLIST_NEXT(entry, next);
    if (!ret) {
        unsigned int bucket = tdb_hash(entry->key) % QDICT_BUCKET_MAX;
        ret = qdict_next_entry(qdict, bucket + 1);
    }
    return ret;
}