From 204e95dfea84e0dd6903d9b21fc80474ada66979 Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Wed, 3 Mar 2021 23:40:12 -0500 Subject: [PATCH] remove unnecessary changes --- src/librfu_rfu.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/librfu_rfu.c b/src/librfu_rfu.c index 1a9f0746e..f39ccb74c 100644 --- a/src/librfu_rfu.c +++ b/src/librfu_rfu.c @@ -1411,12 +1411,8 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize, sendSlotFlag = gRfuLinkStatus->sendSlotNIFlag; if (sendSlotFlag & bmSendSlot) return ERR_SLOT_BUSY; - for (bm_slot_id = 0; bm_slot_id < RFU_CHILD_MAX; ++bm_slot_id) - { - if ((bmSendSlot >> bm_slot_id) & 1) - break; - } - + for (bm_slot_id = 0; bm_slot_id < RFU_CHILD_MAX && !((bmSendSlot >> bm_slot_id) & 1); ++bm_slot_id) + ; if (gRfuLinkStatus->parentChild == MODE_PARENT) llFrameSize_p = &gRfuLinkStatus->remainLLFrameSizeParent; else if (gRfuLinkStatus->parentChild == MODE_CHILD) @@ -1437,7 +1433,7 @@ static u16 rfu_STC_setSendData_org(u8 ni_or_uni, u8 bmSendSlot, u8 subFrameSize, slotStatus_NI->send.bmSlotOrg = bmSendSlot; slotStatus_NI->send.bmSlot = bmSendSlot; slotStatus_NI->send.payloadSize = subFrameSize - frameSize; - if (sending) + if (sending != 0) slotStatus_NI->send.dataType = 0; else slotStatus_NI->send.dataType = 1;