commit 4274dd51d3911d1739f9816bc900ba7ca02713e4
parent 6511fea2cb622c4ff65821401bef3f3c189628f0
Author: William Casarin <jb55@jb55.com>
Date: Wed, 29 Nov 2023 12:03:50 -0800
debug: fix some debug-mode compile issues
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/nostrdb.c b/nostrdb.c
@@ -2329,7 +2329,7 @@ static int ndb_fulltext_word_writer(void *ctx,
if (!ndb_write_word_to_index(wctx->txn, word, word_len, words,
wctx->note->created_at, wctx->note_id)) {
// too big to write this one, just skip it
- ndb_debug(stderr, "failed to write word '%.*s' to index\n", word_len, word);
+ ndb_debug("failed to write word '%.*s' to index\n", word_len, word);
return 0;
}
@@ -3236,7 +3236,9 @@ int _ndb_process_events(struct ndb *ndb, const char *ldjson, size_t json_len, in
#endif
}
+#if DEBUG
ndb_debug("ndb_process_events: processed %d events\n", processed);
+#endif
return 1;
}