Skip to content

Commit

Permalink
ctdb:client: Initialize structs and pointers in ctdb_ctrl_(en|dis)abl…
Browse files Browse the repository at this point in the history
…e_node()

Found by covscan.

Signed-off-by: Andreas Schneider <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
cryptomilk authored and jrasamba committed Dec 15, 2021
1 parent 3397e04 commit 90fd767
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ctdb/client/client_control_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -2667,8 +2667,10 @@ int ctdb_ctrl_disable_node(TALLOC_CTX *mem_ctx,
int destnode,
struct timeval timeout)
{
struct ctdb_req_control request;
struct ctdb_reply_control *reply;
struct ctdb_req_control request = {
.opcode = 0,
};
struct ctdb_reply_control *reply = NULL;
int ret;

ctdb_req_control_disable_node(&request);
Expand Down Expand Up @@ -2701,8 +2703,10 @@ int ctdb_ctrl_enable_node(TALLOC_CTX *mem_ctx,
int destnode,
struct timeval timeout)
{
struct ctdb_req_control request;
struct ctdb_reply_control *reply;
struct ctdb_req_control request = {
.opcode = 0,
};
struct ctdb_reply_control *reply = NULL;
int ret;

ctdb_req_control_enable_node(&request);
Expand Down

0 comments on commit 90fd767

Please sign in to comment.