Add aaa-12 修改dhcp

SOL 修改dhcp
修改人:wuqihy
检视人:yinbin

Signed-off-by: wuqihy <wuqihy@cmhi.chinamobile.com>
This commit is contained in:
wuqihy 2019-09-09 12:32:59 +08:00
parent d1e3b83056
commit 560463e664
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ char *getfileall_with_linefeed(char *fname)
fclose(fp);
return NULL;
}
memset(str, 0, filesize);
memset(str, 0, filesize+100);
rewind(fp);
while((fgets(line,1000,fp))!=NULL){

View File

@ -346,7 +346,7 @@ ret_code dhcp_subnet_config_get(uint source,
char *out = NULL;
char line[1000] = {0};
if ((fp=fopen(fname,"r"))==NULL){
printf("打开文件%s错误\n",fname);
printf("open file %s failed\n",fname);
return RET_ERR;
}
fseek(fp,0,SEEK_END);