X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fcodec_utils%2Fcommon%2Fodu_common_codec.c;h=92667dd2fdc3fb11418bb0889059637b1bdf501c;hb=e7b5eab0138956edeae768a021be476f4a7a807f;hp=7ca79231b09277ed04421b6e25926948858d9eed;hpb=45d134510deb6902b870b4a0fb574b6075fba601;p=o-du%2Fl2.git diff --git a/src/codec_utils/common/odu_common_codec.c b/src/codec_utils/common/odu_common_codec.c index 7ca79231b..92667dd2f 100644 --- a/src/codec_utils/common/odu_common_codec.c +++ b/src/codec_utils/common/odu_common_codec.c @@ -44,22 +44,22 @@ int PrepFinalEncBuf(const void *buffer, size_t size, void *encodedBuf) * RFAILED - failure * * ****************************************************************/ -S16 buildPlmnId(Plmn plmn, OCTET_STRING_t *octe) +uint8_t buildPlmnId(Plmn plmn, uint8_t *buf) { - U8 mncCnt; + uint8_t mncCnt; mncCnt = 2; - octe->buf[0] = ((plmn.mcc[1] << 4) | (plmn.mcc[0])); + buf[0] = ((plmn.mcc[1] << 4) | (plmn.mcc[0])); if(mncCnt == 2) { - octe->buf[1] = ((0xf0) | (plmn.mcc[2])); - octe->buf[2] = ((plmn.mnc[1] << 4) | (plmn.mnc[0])); + buf[1] = ((0xf0) | (plmn.mcc[2])); + buf[2] = ((plmn.mnc[1] << 4) | (plmn.mnc[0])); } else { - octe->buf[1] = ((plmn.mnc[0] << 4) | (plmn.mcc[2])); - octe->buf[2] = ((plmn.mnc[2] << 4) | (plmn.mnc[1])); + buf[1] = ((plmn.mnc[0] << 4) | (plmn.mcc[2])); + buf[2] = ((plmn.mnc[2] << 4) | (plmn.mnc[1])); } - RETVALUE(ROK); + return ROK; } /******************************************************************* @@ -73,21 +73,21 @@ S16 buildPlmnId(Plmn plmn, OCTET_STRING_t *octe) * Functionality: Fills the RicId * * @params[in] BIT_STRING_t *nbid, - * U8 unusedBits - * U8 byteSize - * U8 val + * uint8_t unusedBits + * uint8_t byteSize + * uint8_t val * * @return ROK - success * RFAILED - failure * * ****************************************************************/ -S16 fillBitString(BIT_STRING_t *id, U8 unusedBits, U8 byteSize, U8 val) +uint8_t fillBitString(BIT_STRING_t *id, uint8_t unusedBits, uint8_t byteSize, uint8_t val) { - U8 tmp; + uint8_t tmp; if(id->buf == NULLP) { - RETVALUE(RFAILED); + return RFAILED; } for (tmp = 0 ; tmp < (byteSize-1); tmp++) @@ -96,7 +96,7 @@ S16 fillBitString(BIT_STRING_t *id, U8 unusedBits, U8 byteSize, U8 val) } id->buf[byteSize-1] = val; id->bits_unused = unusedBits; - RETVALUE(ROK); + return ROK; } /******************************************************************* @@ -115,9 +115,9 @@ S16 fillBitString(BIT_STRING_t *id, U8 unusedBits, U8 byteSize, U8 val) * RFAILED - failure * * ****************************************************************/ -S16 bitStringToInt(BIT_STRING_t *bitString, U16 *val) +uint8_t bitStringToInt(BIT_STRING_t *bitString, uint16_t *val) { - U16 idx; + uint16_t idx; if(bitString->buf == NULL || bitString->size <= 0) { DU_LOG("\nDU_APP : Bit string is empty");