commit ec798bdeb23783b72a2476eacfad63066d3bae3b
parent fa9b9522959ad3d19098ddb5618004c5fa3ad1fb
Author: William Casarin <jb55@jb55.com>
Date: Mon, 13 Jan 2025 11:06:09 -0800
nostrdb: debug: fix debug logs
We forgot to move one DEBUG instance to NDB_LOG
Fixes: b4c2ff3d270a ("Only log to stdout if NDB_LOG is defined")
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nostrdb/src/nostrdb.c b/nostrdb/src/nostrdb.c
@@ -575,7 +575,7 @@ int ndb_filter_clone(struct ndb_filter *dst, struct ndb_filter *src)
// are as small as possible. This also prevents new fields from being added
int ndb_filter_end(struct ndb_filter *filter)
{
-#ifdef DEBUG
+#ifdef NDB_LOG
size_t orig_size;
#endif
size_t data_len, elem_len;
@@ -586,7 +586,7 @@ int ndb_filter_end(struct ndb_filter *filter)
// all of the element pointers accordingly
data_len = filter->data_buf.p - filter->data_buf.start;
elem_len = filter->elem_buf.p - filter->elem_buf.start;
-#ifdef DEBUG
+#ifdef NDB_LOG
orig_size = filter->data_buf.end - filter->elem_buf.start;
#endif