opnsense-src/lib/libc/tests/db
Bojan Novković 3a686b851f dbm_nextkey: Always return an error if we've reached the end of the database
POSIX.1 states that `dbm_nextkey` must return an invalid key
(i.e., `key.dptr == NULL`) after the end of the database was reached.
The current implementation of `hash_seq` will incorrectly restart
the key sequence after the end of the database is reached.

Fix this by checking the "current bucket" index when R_NEXT is passed.

Sponsored by:   Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D51635
Reviewed by:	markj
2025-07-31 17:27:24 +02:00
..
dbm_nextkey_test.c dbm_nextkey: Always return an error if we've reached the end of the database 2025-07-31 17:27:24 +02:00
dbm_open_test.c db/hash.c: Allow O_WRONLY in dbm_open 2025-07-30 11:31:16 +02:00
dbm_perm_test.c db/hash.c: Allow O_WRONLY in dbm_open 2025-07-30 11:31:16 +02:00
Makefile dbm_nextkey: Always return an error if we've reached the end of the database 2025-07-31 17:27:24 +02:00
Makefile.depend