-/* Trivial case: do whatever they did for this key. */
-static int trivial_traverse(struct tdb_context *tdb,
- TDB_DATA key, TDB_DATA data,
- void *_tinfo)
-{
- struct traverse_info *tinfo = _tinfo;
- struct traverse *trav = tinfo->op[tinfo->start].trav;
- unsigned int h = hash_key(&key) % (trav->num * 2);
-
- while (trav->hash[h].index) {
- if (key_eq(trav->hash[h].key, key)) {
- run_ops(tdb, tinfo->pre_fd, tinfo->filename,
- tinfo->file, tinfo->op, trav->hash[h].index,
- trav->end);
- tinfo->i++;
- return 0;
- }
- h = (h + 1) % (trav->num * 2);
- }
- fail(tinfo->filename[tinfo->file], tinfo->start + 1,
- "unexpected traverse key");
-}
-