]> rtime.felk.cvut.cz Git - arc.git/commitdiff
lint fixes in PduR.
authoreija <devnull@localhost>
Fri, 12 Aug 2011 11:03:01 +0000 (13:03 +0200)
committereija <devnull@localhost>
Fri, 12 Aug 2011 11:03:01 +0000 (13:03 +0200)
communication/PduR/PduR_Logic.c

index 85b1edf84178f1727c10ac6f575720f30c90bcad..d21e51094bcbb417768180b78adcdc391bba10b4 100644 (file)
 \r
 \r
 BufReq_ReturnType PduR_ARC_AllocateRxBuffer(PduIdType PduId, PduLengthType TpSduLength) {\r
-       BufReq_ReturnType failRetVal = BUFREQ_BUSY;\r
+       BufReq_ReturnType retVal = BUFREQ_BUSY;\r
        for (uint8 i = 0; PduRTpBuffer(i)->pduInfoPtr != NULL; i++) {\r
                if (PduRTpBuffer(i)->status == PDUR_BUFFER_FREE) {\r
                        if (PduRTpBuffer(i)->bufferSize < TpSduLength) {\r
-                               failRetVal = BUFREQ_OVFL;\r
+                               retVal = BUFREQ_OVFL;\r
                        } else {\r
                                PduRTpRouteBuffer(PduId) = PduRTpBuffer(i);\r
                                PduRTpBuffer(i)->pduInfoPtr->SduLength = TpSduLength;\r
                                PduRTpRouteBuffer(PduId)->status = PDUR_BUFFER_RX_BUSY;\r
-                               return BUFREQ_OK;\r
+                               retVal = BUFREQ_OK;\r
+                               break;\r
                        }\r
                }\r
        }\r
-       return failRetVal;\r
+       return retVal;\r
 }\r
 \r
 BufReq_ReturnType PduR_ARC_AllocateTxBuffer(PduIdType PduId, uint16 length) {\r
@@ -107,10 +108,10 @@ Std_ReturnType PduR_ARC_Transmit(PduIdType PduId, const PduInfoType* PduInfo, ui
        return retVal;\r
 }\r
 \r
-void PduR_ARC_RxIndicationTT(const PduRDestPdu_type * destination, const PduInfoType *PduInfo, uint8 BufferLength) {\r
+void PduR_ARC_RxIndicationTT(const PduRDestPdu_type * destination, const PduInfoType *PduInfo, uint16 BufferLength) {\r
        Std_ReturnType retVal = E_OK;\r
 \r
-       uint8 bytesToCopy = 0;\r
+       uint16 bytesToCopy = 0;\r
        if (PduInfo->SduLength > BufferLength){ bytesToCopy = BufferLength;}\r
        else {bytesToCopy = PduInfo->SduLength;}\r
 \r
@@ -229,7 +230,7 @@ Std_ReturnType PduR_ARC_TriggerTransmit(PduIdType PduId, PduInfoType* PduInfo, u
 \r
        } else if (PduR_IsLoModule(route->SrcModule)) {\r
                if (destination->DataProvision == PDUR_TRIGGER_TRANSMIT) {\r
-                       uint8 bytesToCopy = 0;\r
+                       uint16 bytesToCopy = 0;\r
                        if (PduInfo->SduLength > route->SduLength){ bytesToCopy = route->SduLength;}\r
                        else {bytesToCopy = PduInfo->SduLength;}\r
 \r