From e6a80082c890eec5139d91739de1a3d8f76c1357 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 17 Apr 2018 20:07:21 -0700 Subject: [PATCH] ircd::db: Assertion for non-empty key seek. --- ircd/db.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ircd/db.cc b/ircd/db.cc index 98ed75bb8..3c7490949 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -5156,10 +5156,11 @@ void ircd::db::valid_eq_or_throw(const rocksdb::Iterator &it, const string_view &sv) { + assert(!empty(sv)); if(!valid_eq(it, sv)) { throw_on_error(it.status()); - throw not_found(); + throw not_found{}; } } @@ -5169,7 +5170,7 @@ ircd::db::valid_or_throw(const rocksdb::Iterator &it) if(!valid(it)) { throw_on_error(it.status()); - throw not_found(); + throw not_found{}; //assert(0); // status == ok + !Valid() == ??? } }