From 923a9c83dfbde8d2ff13fc12b7ab177a1bcdefe0 Mon Sep 17 00:00:00 2001 From: Jean-Roland Date: Thu, 11 Jul 2024 17:36:43 +0200 Subject: [PATCH] fix: use _z_id_check for timestamp_check --- src/session/utils.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/session/utils.c b/src/session/utils.c index 43faf6b10..4db427c8c 100644 --- a/src/session/utils.c +++ b/src/session/utils.c @@ -38,14 +38,7 @@ void _z_timestamp_clear(_z_timestamp_t *tstamp) { tstamp->time = 0; } -_Bool _z_timestamp_check(const _z_timestamp_t *stamp) { - for (uint8_t i = 0; i < sizeof(_z_id_t); ++i) { - if (stamp->id.id[i] != 0) { - return true; - } - } - return false; -} +_Bool _z_timestamp_check(const _z_timestamp_t *stamp) { return _z_id_check(stamp->id); } int8_t _z_session_generate_zid(_z_id_t *bs, uint8_t size) { int8_t ret = _Z_RES_OK;