if ((ret = __db_delchk(dbp, flags, F_ISSET(dbp, DB_AM_RDONLY))) != 0)
if ((ret = __db_delchk(dbp, key, flags, F_ISSET(dbp, DB_AM_RDONLY))) != 0)
__ham_delete(dbp, txn, key, flags)	DB *dbp;	DB_TXN *txn;	DBT *key;	int flags;{	DB *ldbp;	HTAB *hashp;	HASH_CURSOR *hcp;	int ret, t_ret;	DEBUG_LWRITE(dbp, txn, "ham_delete", key, NULL, flags);	if ((ret = __db_delchk(dbp, flags, F_ISSET(dbp, DB_AM_RDONLY))) != 0)		return (ret);	ldbp = dbp;	if (F_ISSET(dbp, DB_AM_THREAD) &&	    (ret = __db_gethandle(dbp, __ham_hdup, &ldbp)) != 0)		return (ret);	hashp = (HTAB *)ldbp->internal;	SET_LOCKER(ldbp, txn);	GET_META(ldbp, hashp);	hcp = TAILQ_FIRST(&ldbp->curs_queue)->internal;	hashp->hash_accesses++;	if ((ret = __ham_lookup(hashp, hcp, key, 0, DB_LOCK_WRITE)) == 0)		if (F_ISSET(hcp, H_OK))			ret = __ham_del_pair(hashp, hcp, 1);		else			ret = DB_NOTFOUND;	if ((t_ret = __ham_item_done(hashp, hcp, ret == 0)) != 0 && ret == 0)		ret = t_ret;	RELEASE_META(ldbp, hashp);	if (F_ISSET(dbp, DB_AM_THREAD))		__db_puthandle(ldbp);	return (ret);}