fix WhiteScan bug

This commit is contained in:
obdev
2022-09-13 09:34:26 +00:00
committed by wangzelin.wzl
parent aae19e1f3c
commit 3daae395f2
4 changed files with 6 additions and 5 deletions

View File

@ -1829,7 +1829,8 @@ int ObServer::get_network_speed_from_config_file(int64_t &network_speed)
nic_rate_file_exist = 1;
}
memset(buf, 0, MAX_NIC_CONFIG_FILE_SIZE + 1);
fread(buf, 1, MAX_NIC_CONFIG_FILE_SIZE, fp);
// ignore return value of fread, because ferror can get fread state
IGNORE_RETURN fread(buf, 1, MAX_NIC_CONFIG_FILE_SIZE, fp);
char *prate = nullptr;
if (OB_UNLIKELY(0 != ferror(fp))) {