From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 7AF194696C4 for ; Sat, 11 Apr 2020 15:34:05 +0300 (MSK) From: Serge Petrenko Date: Sat, 11 Apr 2020 15:33:44 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 1/2] trigger: add trigger_is_set() method List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sergeyb@tarantool.org, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org --- src/lib/core/trigger.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/core/trigger.h b/src/lib/core/trigger.h index 7b500dd92..ae477ad70 100644 --- a/src/lib/core/trigger.h +++ b/src/lib/core/trigger.h @@ -95,6 +95,12 @@ trigger_add_unique(struct rlist *list, struct trigger *trigger) trigger_add(list, trigger); } +static inline int +trigger_is_set(struct trigger *trigger) +{ + return !rlist_empty(&trigger->link); +} + static inline void trigger_clear(struct trigger *trigger) { -- 2.21.1 (Apple Git-122.3)