X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fcm_lib.c;h=20ec8207d255419e8a1559e21a0145bf9dcadca2;hb=694adde1a08c393a8443fd5bbd4f036f5cf85403;hp=412186ddfd97f84fc58f30631b8b5240d6c46b78;hpb=aee73991f728cc127d1ed76d5a52571d916235a4;p=o-du%2Fl2.git diff --git a/src/cm/cm_lib.c b/src/cm/cm_lib.c index 412186ddf..20ec8207d 100644 --- a/src/cm/cm_lib.c +++ b/src/cm/cm_lib.c @@ -197,21 +197,20 @@ EXTERN Size regMemSize; * */ #ifdef ANSI -PUBLIC U8 *cmMemcpy +U8 *cmMemcpy ( U8 *tgt, CONSTANT U8 *src, PTR len ) #else -PUBLIC U8 *cmMemcpy(tgt, src, len) +U8 *cmMemcpy(tgt, src, len) U8 *tgt; CONSTANT U8 *src; PTR len; #endif { /*cm_lib_c_001.main_14 : Fix for TRACE5 feature crash due to missing TRC MACRO*/ - TRC2(cmMemcpy) #ifdef MS_MBUF_CORRUPTION /* checking for valid memory address */ if ((tgt > startPtr128) && (tgt < (startPtr128+regMemSize))) @@ -234,7 +233,7 @@ if ((src > startPtr128) && (src < (startPtr128+regMemSize))) } #endif #if (MEMCPY_AVAIL) /* memcpy is available */ - return ((U8 *) memcpy((Void *)tgt, (CONSTANT Void *)src, (size_t)len)); + return ( memcpy(tgt, src, len)); #else while (len--) *tgt++ = *src++; @@ -263,21 +262,20 @@ if ((src > startPtr128) && (src < (startPtr128+regMemSize))) * */ #ifdef ANSI -PUBLIC S16 cmMemcmp +S16 cmMemcmp ( CONSTANT U8 *s1, CONSTANT U8 *s2, PTR len ) #else -PUBLIC S16 cmMemcmp (s1, s2, len) +S16 cmMemcmp (s1, s2, len) CONSTANT U8 *s1; CONSTANT U8 *s2; PTR len; #endif { /*cm_lib_c_001.main_14 : Fix for TRACE5 feature crash due to missing TRC MACRO*/ - TRC2(cmMemcmp) #if MEMCMP_AVAIL /* memcmp is available */ return ((S16) memcmp((CONSTANT Void *)s1, (CONSTANT Void *)s2, (size_t)len)); #else /* MEMCMP_AVAIL: memcmp is not available */ @@ -312,21 +310,20 @@ PTR len; * */ #ifdef ANSI -PUBLIC U8 *cmMemset +U8 *cmMemset ( U8 *str, U8 val, PTR len ) #else -PUBLIC U8 *cmMemset(str, val, len) +U8 *cmMemset(str, val, len) U8 *str; U8 val; PTR len; #endif { /*cm_lib_c_001.main_14 : Fix for TRACE5 feature crash due to missing TRC MACRO*/ - TRC2(cmMemset) #if MS_MBUF_CORRUPTION /* checking for valid memory address */ if ((str > startPtr128) && (str < (startPtr128+regMemSize))) { @@ -345,7 +342,7 @@ if ((str > startPtr128) && (str < (startPtr128+regMemSize))) } else { - memset((void *)str,val,(size_t) len); + memset(str,val, len); } #else /* MEMSET_AVAIL: memset is not available */ while (len --) @@ -391,19 +388,18 @@ if ((str > startPtr128) && (str < (startPtr128+regMemSize))) * */ #ifdef ANSI -PUBLIC S16 cmStrcmp +S16 cmStrcmp ( CONSTANT U8 *s1, CONSTANT U8 *s2 ) #else -PUBLIC S16 cmStrcmp (s1, s2) +S16 cmStrcmp (s1, s2) CONSTANT U8 *s1; CONSTANT U8 *s2; #endif { /*cm_lib_c_001.main_14 : Fix for TRACE5 feature crash due to missing TRC MACRO*/ - TRC2(cmStrcmp) #if (STRCMP_AVAIL) return (strcmp((CONSTANT S8 *)s1, (CONSTANT S8 *)s2)); #else /* STRCMP_AVAIL */ @@ -456,21 +452,20 @@ CONSTANT U8 *s2; * */ #ifdef ANSI -PUBLIC S16 cmStrncmp +S16 cmStrncmp ( CONSTANT U8 *s1, CONSTANT U8 *s2, MsgLen len /* cm_lib_c_001.main_12: Changing from S16 to MsgLen.*/ ) #else -PUBLIC S16 cmStrncmp (s1, s2, len) +S16 cmStrncmp (s1, s2, len) CONSTANT U8 *s1; CONSTANT U8 *s2; MsgLen len; #endif { /*cm_lib_c_001.main_14 : Fix for TRACE5 feature crash due to missing TRC MACRO*/ - TRC2(cmStrncmp) #if (STRNCMP_AVAIL) return (strncmp((CONSTANT S8 *)s1, (CONSTANT S8 *)s2, (size_t) len)); #else /* STRNCMP_AVAIL */ @@ -511,25 +506,23 @@ MsgLen len; * */ #ifdef ANSI -PUBLIC MsgLen cmStrlen +MsgLen cmStrlen ( CONSTANT U8 *s ) #else /* cm_lib_c_001.main_12: Changing from S16 to MsgLen.*/ -PUBLIC MsgLen cmStrlen (s) +MsgLen cmStrlen (s) CONSTANT U8 *s; #endif { #if (STRLEN_AVAIL) /*cm_lib_c_001.main_15 : Fix for warning due to mixed declation*/ - TRC2(cmStrlen) return ((MsgLen)strlen((CONSTANT S8 *)s)); #else /* STRLEN_AVAIL */ MsgLen i; /*cm_lib_c_001.main_15 : Fix for warning due to mixed declation*/ - TRC2(cmStrlen) for (i = 0; *s; i++, s++); return (i);