There's no need to clear the whole struct ibv_destroy_flow with memset(): only comp_mask field is not explicitly initialized in the function.
This patch removes call to memset() and initialize comp_mask to 0. Link: http://marc.info/?i=cover.1412163687.git.ydrone...@opteya.com Fixes: 389de6a6ef4e ('Add receive flow steering support') Cc: Hadar Hen Zion <had...@mellanox.com> Cc: Or Gerlitz <ogerl...@mellanox.com> Cc: Matan Barak <mat...@mellanox.com> Signed-off-by: Yann Droneaud <ydrone...@opteya.com> --- src/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd.c b/src/cmd.c index 2f039f6852bb..d849e6dac214 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1384,8 +1384,8 @@ int ibv_cmd_destroy_flow(struct ibv_flow *flow_id) struct ibv_destroy_flow cmd; int ret = 0; - memset(&cmd, 0, sizeof(cmd)); IBV_INIT_CMD_EX(&cmd, sizeof(cmd), DESTROY_FLOW); + cmd.comp_mask = 0; cmd.flow_handle = flow_id->handle; if (write(flow_id->context->cmd_fd, &cmd, sizeof(cmd)) != sizeof(cmd)) -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html