[sheepdog] [PATCH] sheep/config: init return value in init_config_file
Ruoyu
liangry at ucweb.com
Thu Jul 24 10:52:05 CEST 2014
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(-)
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
More information about the sheepdog
mailing list