[Tarantool-patches] [PATCH v12 2/8] alter: shrink txn_alter_trigger_new code
Cyrill Gorcunov
gorcunov at gmail.com
Tue Apr 7 18:14:55 MSK 2020
Instead of calling memset which is useless here
just use trigger_create helper.
Acked-by: Konstantin Osipov <kostja.osipov at gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
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
More information about the Tarantool-patches
mailing list