From e94569b2b242e97549b0e7fe77af5434b4e551b8 Mon Sep 17 00:00:00 2001 From: tangzhenye <361869840@qq.com> Date: Sat, 11 Jun 2022 14:26:17 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E9=87=8D=E8=AF=BB=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fdb_tsdb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/fdb_tsdb.c b/src/fdb_tsdb.c index 2d7ebff..4ddc3b9 100644 --- a/src/fdb_tsdb.c +++ b/src/fdb_tsdb.c @@ -621,15 +621,11 @@ void fdb_tsl_iter_by_time(fdb_tsdb_t db, fdb_time_t from, fdb_time_t to, fdb_tsl do { read_tsl(db, &tsl); if (tsl.status != FDB_TSL_UNUSED) { - if (from <= to && tsl.time >= from && tsl.time <= to) { + if ((from <= to && tsl.time >= from && tsl.time <= to) || (from > to && tsl.time <= from && tsl.time >= to)) { /* iterator is interrupted when callback return true */ if (cb(&tsl, cb_arg)) { return; } - } else if (from > to && tsl.time <= from && tsl.time >= to){ - if (cb(&tsl, cb_arg)) { - return; - } } else { return; }