[sheepdog] [PATCH] sheep/config: init return value in init_config_file
Hitoshi Mitake
mitake.hitoshi at gmail.com
Sun Jul 27 07:20:10 CEST 2014
At Thu, 24 Jul 2014 16:52:05 +0800,
Ruoyu wrote:
>
> Now ret is not initialized. Once config file is not existed, maybe
> the return value of the function is not zero even if the new config
> is created successfully.
>
> Signed-off-by: Ruoyu <liangry at ucweb.com>
> ---
> sheep/config.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Hitoshi
>
> diff --git a/sheep/config.c b/sheep/config.c
> index 846a802..383a1ed 100644
> --- a/sheep/config.c
> +++ b/sheep/config.c
> @@ -71,7 +71,7 @@ static int get_cluster_config(struct cluster_info *cinfo)
>
> int init_config_file(void)
> {
> - int fd, ret;
> + int fd, ret = 0;
>
> check_tmp_config();
>
> --
> 1.8.3.2
>
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
More information about the sheepdog
mailing list