Re: [PATCH] votequorum: Properly initialize atb and atb_string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACK.

On 2/26/2014 1:04 PM, Jan Friesse wrote:
> icmap_get_* behavior is to NOT modify passed variable when it doesn't
> success. So we must initialize variable before icmap_get_* call.
> 
> Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
> ---
>  exec/votequorum.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/exec/votequorum.c b/exec/votequorum.c
> index dc0999d..1e913eb 100644
> --- a/exec/votequorum.c
> +++ b/exec/votequorum.c
> @@ -1211,9 +1211,9 @@ static char *votequorum_readconfig(int runtime)
>  	uint32_t node_votes = 0, qdevice_votes = 0;
>  	uint32_t node_expected_votes = 0, expected_votes = 0;
>  	uint32_t node_count = 0;
> -	uint8_t atb;
> +	uint8_t atb = 0;
>  	int have_nodelist, have_qdevice;
> -	char *atb_string;
> +	char *atb_string = NULL;
>  	char *error = NULL;
>  
>  	ENTER();
> 

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss




[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux