From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 878D14696C4 for ; Sat, 4 Apr 2020 19:15:52 +0300 (MSK) Received: by mail-lf1-f65.google.com with SMTP id 131so8275991lfh.11 for ; Sat, 04 Apr 2020 09:15:52 -0700 (PDT) From: Cyrill Gorcunov Date: Sat, 4 Apr 2020 19:15:18 +0300 Message-Id: <20200404161524.7466-3-gorcunov@gmail.com> In-Reply-To: <20200404161524.7466-1-gorcunov@gmail.com> References: <20200404161524.7466-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v11 2/8] box/alter: shrink txn_alter_trigger_new code List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tml Instead of calling memset which is useless here just use trigger_create helper. Signed-off-by: Cyrill Gorcunov --- src/box/alter.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/box/alter.cc b/src/box/alter.cc index d73679fb8..dbbbcbc44 100644 --- a/src/box/alter.cc +++ b/src/box/alter.cc @@ -820,9 +820,7 @@ txn_alter_trigger_new(trigger_f run, void *data) diag_set(OutOfMemory, size, "region", "struct trigger"); return NULL; } - trigger = (struct trigger *)memset(trigger, 0, size); - trigger->run = run; - trigger->data = data; + trigger_create(trigger, run, data, NULL); return trigger; } -- 2.20.1