[Tarantool-patches] [PATCH v11 2/8] box/alter: shrink txn_alter_trigger_new code
Cyrill Gorcunov
gorcunov at gmail.com
Sat Apr 4 19:15:18 MSK 2020
Instead of calling memset which is useless here
just use trigger_create helper.
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