mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-02-27 04:01:45 +01:00
CLEANUP: lua: remove unneeded memset(0) after calloc()
No need for these memset() anymore, since calloc() was put there to avoid them.
This commit is contained in:
parent
3c7a77c0e7
commit
7a4501757f
@ -4364,9 +4364,6 @@ __LJMP static int hlua_register_converters(lua_State *L)
|
||||
sck->kw[0].out_type = SMP_T_STR;
|
||||
sck->kw[0].private = fcn;
|
||||
|
||||
/* End of array. */
|
||||
memset(&sck->kw[1], 0, sizeof(struct sample_conv));
|
||||
|
||||
/* Register this new converter */
|
||||
sample_register_convs(sck);
|
||||
|
||||
@ -4425,9 +4422,6 @@ __LJMP static int hlua_register_fetches(lua_State *L)
|
||||
sfk->kw[0].val = 0;
|
||||
sfk->kw[0].private = fcn;
|
||||
|
||||
/* End of array. */
|
||||
memset(&sfk->kw[1], 0, sizeof(struct sample_fetch));
|
||||
|
||||
/* Register this new fetch. */
|
||||
sample_register_fetches(sfk);
|
||||
|
||||
@ -4647,9 +4641,6 @@ __LJMP static int hlua_register_action(lua_State *L)
|
||||
/* List head */
|
||||
akl->list.n = akl->list.p = NULL;
|
||||
|
||||
/* End of array. */
|
||||
memset(&akl->kw[1], 0, sizeof(*akl->kw));
|
||||
|
||||
/* action keyword. */
|
||||
len = strlen("lua.") + strlen(name) + 1;
|
||||
akl->kw[0].kw = calloc(1, len);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user