commit 2146ec37179d70e7b760c6131183cd0f442c29c9
parent 39806dc1f8d7d78ceb44213a19ccb6d01604a91a
Author: William Casarin <jb55@jb55.com>
Date: Mon, 13 Jan 2025 18:10:17 -0800
refactor: a few small formatting changes
No functional changes, just formatting cleanups
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/nostrdb.c b/src/nostrdb.c
@@ -3047,8 +3047,7 @@ static int query_is_full(struct ndb_query_results *results, int limit)
static int ndb_query_plan_execute_ids(struct ndb_txn *txn,
struct ndb_filter *filter,
struct ndb_query_results *results,
- int limit
- )
+ int limit)
{
MDB_cursor *cur;
MDB_dbi db;
@@ -3908,9 +3907,10 @@ retry:
return 0;
}
- if (last_result) {
- if (last_result->key.note_id != result->key.note_id)
- return 0;
+ // if the note id doesn't match the last result, then we stop trying
+ // each search word
+ if (last_result && last_result->key.note_id != result->key.note_id) {
+ return 0;
}
// On success, this could still be not related at all.