xfrm: trival refactoring initialization of stack-allocated arguments to nl_send_simple()
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
eae6a6875c
commit
c3dd6a7355
2 changed files with 8 additions and 6 deletions
|
@ -643,10 +643,11 @@ static struct nla_policy xfrm_sa_policy[XFRMA_MAX+1] = {
|
|||
|
||||
static int xfrm_sa_request_update(struct nl_cache *c, struct nl_sock *h)
|
||||
{
|
||||
struct xfrm_id sa_id;
|
||||
struct xfrm_id sa_id;
|
||||
|
||||
memset ((void *)&sa_id, 0, sizeof (struct xfrm_id));
|
||||
return nl_send_simple (h, XFRM_MSG_GETSA, NLM_F_DUMP,(void*)&sa_id, sizeof (struct xfrm_id));
|
||||
memset (&sa_id, 0, sizeof (sa_id));
|
||||
return nl_send_simple (h, XFRM_MSG_GETSA, NLM_F_DUMP,
|
||||
&sa_id, sizeof (sa_id));
|
||||
}
|
||||
|
||||
int xfrmnl_sa_parse(struct nlmsghdr *n, struct xfrmnl_sa **result)
|
||||
|
|
|
@ -506,10 +506,11 @@ static struct nla_policy xfrm_sp_policy[XFRMA_MAX+1] = {
|
|||
|
||||
static int xfrm_sp_request_update(struct nl_cache *c, struct nl_sock *h)
|
||||
{
|
||||
struct xfrm_userpolicy_id sp_id;
|
||||
struct xfrm_userpolicy_id sp_id;
|
||||
|
||||
memset ((void *)&sp_id, 0, sizeof (struct xfrm_userpolicy_id));
|
||||
return nl_send_simple (h, XFRM_MSG_GETPOLICY, NLM_F_DUMP,(void*)&sp_id, sizeof (struct xfrm_userpolicy_id));
|
||||
memset (&sp_id, 0, sizeof (sp_id));
|
||||
return nl_send_simple (h, XFRM_MSG_GETPOLICY, NLM_F_DUMP,
|
||||
&sp_id, sizeof (sp_id));
|
||||
}
|
||||
|
||||
int xfrmnl_sp_parse(struct nlmsghdr *n, struct xfrmnl_sp **result)
|
||||
|
|
Loading…
Add table
Reference in a new issue