review代码规范整改

Signed-off-by: y500286920 <yangliu158@huawei.com>
This commit is contained in:
y500286920
2022-08-02 16:59:40 +08:00
committed by Agrant
parent fec3d60d02
commit 01a7965e2c
2 changed files with 7 additions and 7 deletions
@@ -49,9 +49,9 @@ static void SendBackPressureFrame(DFileTrans *dFileTrans)
allSize = recvListAllSize + recvInnerAllSize;
uint32_t recvListWindowSize = (dFileTrans->fileManager->iowMaxRate * DFILE_KILOBYTES / NSTACKX_MILLI_TICKS)
* NSTACKX_ACK_INTERVAL * FILE_RECV_LIST_SLOW_START_RATE;
if ((allSize >= dFileTrans->fileManager->iowCount * FILE_RECV_LIST_IO_WRITE_THRESHOLD) ||
(allSize >= dFileTrans->fileManager->maxRecvBlockListSize * FILE_RECV_LIST_IO_WRITE_THRESHOLD) ||
(allSize * blockFrameSize >= recvListWindowSize) && (allSize > 0)) {
if (allSize >= dFileTrans->fileManager->iowCount * FILE_RECV_LIST_IO_WRITE_THRESHOLD ||
allSize >= dFileTrans->fileManager->maxRecvBlockListSize * FILE_RECV_LIST_IO_WRITE_THRESHOLD ||
allSize * blockFrameSize >= recvListWindowSize && allSize > 0) {
dFileTrans->fileManager->recvListOverIo = 1;
} else {
dFileTrans->fileManager->recvListOverIo = 0;
@@ -210,10 +210,10 @@ void NoticeSessionProgress(DFileSession *session)
{
DFileMsg data;
(void)memset_s(&data, sizeof(data), 0, sizeof(data));
if ((FileManagerGetTotalBytes(session->fileManager, &data.transferUpdate.totalBytes) == NSTACKX_EOK) &&
(FileManagerGetBytesTransferred(session->fileManager, &data.transferUpdate.bytesTransferred) == NSTACKX_EOK) &&
(data.transferUpdate.bytesTransferred <= data.transferUpdate.totalBytes) &&
(data.transferUpdate.bytesTransferred > 0)) {
if (FileManagerGetTotalBytes(session->fileManager, &data.transferUpdate.totalBytes) == NSTACKX_EOK &&
FileManagerGetBytesTransferred(session->fileManager, &data.transferUpdate.bytesTransferred) == NSTACKX_EOK &&
data.transferUpdate.bytesTransferred <= data.transferUpdate.totalBytes &&
data.transferUpdate.bytesTransferred > 0) {
NotifyMsgRecver(session, DFILE_ON_SESSION_IN_PROGRESS, &data);
}
}