From 9de2c05b253a3d44185d781b3616e2da789b6fbb Mon Sep 17 00:00:00 2001 From: zhanglianghy Date: Thu, 1 Aug 2019 18:31:35 +0800 Subject: [PATCH] =?UTF-8?q?MOD=20aaa-12=20=E6=A1=A5=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=8A=E4=BC=A0=20SOL=20=20=E6=A1=A5?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E4=BB=A3=E7=A0=81=E4=B8=8A=E4=BC=A0=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=EF=BC=9Azhangliang=20=E6=A3=80?= =?UTF-8?q?=E8=A7=86=E4=BA=BA=EF=BC=9Azhangliang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Platform/common/rpc/rpc_common.h | 2 +- Platform/user/configm/config-server/netconfig/parsefile.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Platform/common/rpc/rpc_common.h b/Platform/common/rpc/rpc_common.h index eff27ba7d..59e1dd365 100755 --- a/Platform/common/rpc/rpc_common.h +++ b/Platform/common/rpc/rpc_common.h @@ -56,7 +56,7 @@ typedef enum { { RET_NOTSUPPORT, "NotSupport"},\ { RET_INPUTERR, "InputError"},\ { RET_IPINVALID, "IpInvalid"},\ - { RET_BR_INVALID, "BrNameInvalid"}, + { RET_BR_INVALID, "BrNameInvalid"},\ { RET_EXIST, "AlreadyExist"}\ } diff --git a/Platform/user/configm/config-server/netconfig/parsefile.c b/Platform/user/configm/config-server/netconfig/parsefile.c index 16278c445..f3103edec 100644 --- a/Platform/user/configm/config-server/netconfig/parsefile.c +++ b/Platform/user/configm/config-server/netconfig/parsefile.c @@ -239,9 +239,7 @@ int conf_value_in_block_del(char *conf_path, char *start_str, int conf_value_block_del(char *conf_path, char *start_str, char *end_str) { char config_linebuf[IF_BUFF_LEN]; - int configbuf_lenth = strlen(conf_buff) + 5; long congig_lenth = 0; - boolean next_flag = FALSE; char *start_line = NULL; FILE *f = fopen(conf_path, "r+"); @@ -256,7 +254,7 @@ int conf_value_block_del(char *conf_path, char *start_str, char *end_str) congig_lenth = ftell(f); - char sum_buf[congig_lenth + configbuf_lenth]; + char sum_buf[congig_lenth]; memset(sum_buf, 0, sizeof(sum_buf));