Skip to content

Commit

Permalink
Initialize one variable in struct to avoid risk (#1606)
Browse files Browse the repository at this point in the history
In C, we had better initialize every variable in struct, this PR fixes
one missed variable Initialization.

---------

Signed-off-by: hwware <[email protected]>
  • Loading branch information
hwware authored Jan 28, 2025
1 parent f695c52 commit ad60d6b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cluster_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,7 @@ void clusterInit(void) {
server.cluster->failover_auth_time = 0;
server.cluster->failover_auth_count = 0;
server.cluster->failover_auth_rank = 0;
server.cluster->failover_auth_sent = 0;
server.cluster->failover_failed_primary_rank = 0;
server.cluster->failover_auth_epoch = 0;
server.cluster->cant_failover_reason = CLUSTER_CANT_FAILOVER_NONE;
Expand Down

0 comments on commit ad60d6b

Please sign in to comment.