U8, U16, U32 data type changes
[o-du/l2.git] / src / mt / ss_msg.c
index 15cc55d..54dcdb6 100644 (file)
@@ -91,7 +91,7 @@
 #endif /* SS_SEUM_CAVIUM */
 #include <pthread.h>
 #ifdef XEON_SPECIFIC_CHANGES
-U32 startMemLeak=0; 
+uint32_t startMemLeak=0; 
 extern pthread_mutex_t  memLock;
 #endif
 
@@ -104,23 +104,23 @@ extern pthread_mutex_t  memLock;
 #include "mt_plat_t33.x"
 #endif
 /* forward declarations */
-PUBLIC S16 ssGetDBufOfSize ARGS((Region region, Size size, Buffer **dBuf));
-PUBLIC S16 SIncMsgRef(Buffer *srcBuf,Region dstRegion, Pool dstPool,Buffer **dstBuf);
+S16 ssGetDBufOfSize ARGS((Region region, Size size, Buffer **dBuf));
+S16 SIncMsgRef(Buffer *srcBuf,Region dstRegion, Pool dstPool,Buffer **dstBuf);
 #ifdef SSI_STATIC_MEM_LEAK_DETECTION
-EXTERN PUBLIC U32 GetNextFreeIdx ARGS((StaticMemAllocInfo * memAllocInfo));
-EXTERN PUBLIC void LogForStaticMemLeak ARGS((StaticMemAllocInfo* memAllocInfo, char* 
-         file, U32 line, U32 size, void* ptr, U32 idx));
-EXTERN PUBLIC void FreeIdx ARGS((U8* ptr, U32 idx, StaticMemAllocInfo*
-         memAllocInfo,U32 size, char* file, U32 line));
+EXTERN uint32_t GetNextFreeIdx ARGS((StaticMemAllocInfo * memAllocInfo));
+EXTERN void LogForStaticMemLeak ARGS((StaticMemAllocInfo* memAllocInfo, char* 
+         file, uint32_t line, uint32_t size, void* ptr, uint32_t idx));
+EXTERN void FreeIdx ARGS((uint8_t* ptr, uint32_t idx, StaticMemAllocInfo*
+         memAllocInfo,uint32_t size, char* file, uint32_t line));
 #endif
 
 #ifdef SS_USE_ZBC_MEMORY
 #ifdef T2K_MEM_LEAK_DBG
-PRIVATE S16 SPutZbcDBufNew ARGS((Region region, Buffer *buf,char*,U32));
+PRIVATE S16 SPutZbcDBufNew ARGS((Region region, Buffer *buf,char*,uint32_t));
 
 #else
 PRIVATE S16 SPutZbcDBuf ARGS((Region region, Buffer *buf));
-PUBLIC S16 SAttachPtrToBuf ARGS(( Region   region, Pool     pool, Data    *ptr,
+S16 SAttachPtrToBuf ARGS(( Region   region, Pool     pool, Data    *ptr,
          MsgLen   totalLen, Buffer** mBuf));
 #endif
 #endif
@@ -129,29 +129,29 @@ PUBLIC S16 SAttachPtrToBuf ARGS(( Region   region, Pool     pool, Data    *ptr,
 #ifdef SS_M_PROTO_REGION 
 #ifdef T2K_MEM_LEAK_DBG
 #define DupMsg(region,buffer) DupMsgNew(region,buffer,file,line)
-PRIVATE Buffer *DupMsgNew ARGS((Region region, Buffer *buffer,char*,U32));
+PRIVATE Buffer *DupMsgNew ARGS((Region region, Buffer *buffer,char*,uint32_t));
 #else
 #ifdef INTEL_WLS
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SAttachPtrToMBuf1 ARGS(( Region   region, Pool     pool, Data    *ptr, MsgLen   totalLen,
-                                   MsgLen   ptrLen, Buffer** mBuf, char* file, U32 line));
+S16 SAttachPtrToMBuf1 ARGS(( Region   region, Pool     pool, Data    *ptr, MsgLen   totalLen,
+                                   MsgLen   ptrLen, Buffer** mBuf, char* file, uint32_t line));
 #else
-PUBLIC S16 SAttachPtrToMBuf ARGS(( Region   region, Pool     pool, Data    *ptr, MsgLen   totalLen,
+S16 SAttachPtrToMBuf ARGS(( Region   region, Pool     pool, Data    *ptr, MsgLen   totalLen,
                                    MsgLen   ptrLen, Buffer** mBuf));
 #endif
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SAttachWlsPtrToMBuf1 ARGS(( Region   region, Pool     pool, Data    *ptr, 
+S16 SAttachWlsPtrToMBuf1 ARGS(( Region   region, Pool     pool, Data    *ptr, 
                                       Data    *readPtr,    MsgLen   totalLen,
-                                      MsgLen   ptrLen, Buffer** mBuf, char* file, U32 line));
+                                      MsgLen   ptrLen, Buffer** mBuf, char* file, uint32_t line));
 
-PUBLIC S16 SAttachWlsPtrToMBuf ARGS(( Region   region, Pool     pool, Data    *ptr, 
+S16 SAttachWlsPtrToMBuf ARGS(( Region   region, Pool     pool, Data    *ptr, 
                                       Data    *readPtr,    MsgLen   totalLen,
                                       MsgLen   ptrLen, Buffer** mBuf));
 #endif
 #ifdef TENB_DPDK_BUF
-PUBLIC S16 SDetachDpdkPtrFrmMBuf ARGS((Buffer   *mBuf, Data     **ptr));
-PUBLIC S16 SDetachDpdkPtrFrmDBuf ARGS((Buffer   *mBuf, Data     **ptr));
-PUBLIC S16 SPutSBufDpdk          ARGS(( Data    *ptr));
+S16 SDetachDpdkPtrFrmMBuf ARGS((Buffer   *mBuf, Data     **ptr));
+S16 SDetachDpdkPtrFrmDBuf ARGS((Buffer   *mBuf, Data     **ptr));
+S16 SPutSBufDpdk          ARGS(( Data    *ptr));
 #endif  /* TENB_DPDK_BUF */
 
 
@@ -216,7 +216,7 @@ PRIVATE Buffer *DupMsg ARGS((Region region, Buffer *buffer));
 EXTERN pthread_t tmpRegTidMap[20];
 #define CM_MEM_GET_REGION(_region)                        \
 {                                                         \
-   U8  _regCnt;                                           \
+   uint8_t  _regCnt;                                           \
    _region = 0xFF;                                        \
                                                           \
    for(_regCnt = 0; _regCnt < 12; _regCnt++)              \
@@ -251,24 +251,24 @@ extern S32 clusterMode;
 *
 */
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 ssGetDBufOfSizeNew
+S16 ssGetDBufOfSizeNew
 (
 Region region,
 Size size,
 Buffer **dBuf,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 ssGetDBufOfSize
+S16 ssGetDBufOfSize
 (
 Region region,
 Size size,
 Buffer **dBuf
 )
 #else
-PUBLIC S16 ssGetDBufOfSize(region, size, dBuf)
+S16 ssGetDBufOfSize(region, size, dBuf)
 Region region;
 Size size;
 Buffer **dBuf;
@@ -279,40 +279,38 @@ Buffer **dBuf;
    Data *data;
    SsDblk *dptr;
 
-   TRC1(ssGetDBufOfSize)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check buffer pointer */
    if (!dBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS047, ERRZERO, "ssGetDBufOfSize : Null\
                  Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS048, ERRZERO, "ssGetDBufOfSize : Invalid\
                 region id");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
  
    if (size <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS049, ERRZERO, "ssGetDBufOfSize : Invalid\
                  size");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
    /* ss006.301 : optmized this function */
    mdsize = MDBSIZE + size;
 #ifdef SS_HISTOGRAM_SUPPORT 
-   if (SAlloc(region, &mdsize, 0, (Data **) dBuf, __LINE__, (U8*) __FILE__, ENTNC) != ROK)
+   if (SAlloc(region, &mdsize, 0, (Data **) dBuf, __LINE__, (uint8_t*) __FILE__, ENTNC) != ROK)
 #else
    if (SAlloc(region, &mdsize, 0, (Data **) dBuf) != ROK)
 #endif /* SS_HISTOGRAM_SUPPORT */
    {
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
    data = (Data *) (*dBuf) + MDBSIZE;
    size = mdsize - MDBSIZE;
@@ -327,7 +325,7 @@ Buffer **dBuf;
    }
 #endif
    
-   RETVALUE(ROK);
+   return ROK;
 } /* ssGetDBufOfSize */
 
 
@@ -351,42 +349,42 @@ Buffer **dBuf;
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT 
 #ifdef ANSI
-PUBLIC S16 SGetMsgNew
+S16 SGetMsgNew
 (
 Region region,              /* region id */
 Pool pool,                  /* pool id */
 Buffer **mBuf,              /* pointer to message buffer */
-U32    line,
-U8     *fileName
+uint32_t    line,
+uint8_t     *fileName
 )
 #else
-PUBLIC S16 SGetMsgNew(region, pool, mBuf, line, fileName)
+S16 SGetMsgNew(region, pool, mBuf, line, fileName)
 Region region;              /* region id */
 Pool pool;                  /* pool id */
 Buffer **mBuf;              /* pointer to message buffer */
-U32    line;
-U8     *fileName;
+uint32_t    line;
+uint8_t     *fileName;
 #endif
 #else /* SS_HISTOGRAM_SUPPORT */
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SGetMsgNew
+S16 SGetMsgNew
 (
 Region region,              /* region id */
 Pool pool,                  /* pool id */
 Buffer **mBuf,              /* pointer to message buffer */
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SGetMsg
+S16 SGetMsg
 (
 Region region,              /* region id */
 Pool pool,                  /* pool id */
 Buffer **mBuf              /* pointer to message buffer */
 )
 #else
-PUBLIC S16 SGetMsg(region, pool, mBuf)
+S16 SGetMsg(region, pool, mBuf)
 Region region;              /* region id */
 Pool pool;                  /* pool id */
 Buffer **mBuf;              /* pointer to message buffer */
@@ -411,8 +409,6 @@ Buffer **mBuf;              /* pointer to message buffer */
 #endif
 
 
-   TRC1(SGetMsgNew)
-
 #ifdef XEON_SPECIFIC_CHANGES
    region = 0;
    pool   = 0;
@@ -423,19 +419,19 @@ Buffer **mBuf;              /* pointer to message buffer */
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS050, ERRZERO, "SGetMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS051, ERRZERO, "SGetMsg : Invalid region\
                                                    id");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
  
    if (pool >= SS_MAX_POOLS_PER_REG)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS052, ERRZERO, "SGetMsg : Invalid pool id");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 /* ss037.103 Removed the semaphore operation for performance enhancement */
@@ -452,7 +448,7 @@ Buffer **mBuf;              /* pointer to message buffer */
                   "Could not lock region table");
 #endif
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 #endif
@@ -468,12 +464,12 @@ Buffer **mBuf;              /* pointer to message buffer */
 #if (ERRCLASS & ERRCLS_DEBUG)
          SSLOGERROR(ERRCLS_DEBUG, ESS054, ERRZERO,
                   "Could not release semaphore");
-         RETVALUE(RFAILED);
+         return RFAILED;
 #endif
       }
 #endif
       SSLOGERROR(ERRCLS_INT_PAR, ESS055, region, "Region not registered");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 /* ss037.103 Removed the semaphore operation for performance enhancement */
 
@@ -483,7 +479,7 @@ Buffer **mBuf;              /* pointer to message buffer */
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS056, ERRZERO,
                   "Could not release semaphore");
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif
    }
 #endif
@@ -504,7 +500,7 @@ Buffer **mBuf;              /* pointer to message buffer */
 #endif /* SS_HISTOGRAM_SUPPORT */
    {
       SSLOGERROR(ERRCLS_DEBUG, ESS058, ERRZERO, "SGetMsg:Failed in SAlloc");
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
 #else /* SS_M_PROTO_REGION */  
 /* ss001.301: additions */
@@ -515,7 +511,7 @@ Buffer **mBuf;              /* pointer to message buffer */
 #endif /* SS_HISTOGRAM_SUPPORT */
    {
       SSLOGERROR(ERRCLS_DEBUG, ESS059, ERRZERO, "SGetMsg:Failed in SAlloc");
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
 #endif /* SS_M_PROTO_REGION */
 
@@ -546,7 +542,7 @@ Buffer **mBuf;              /* pointer to message buffer */
       }
    }
 #endif
-   RETVALUE(ROK);
+   return ROK;
 }
 
 #ifdef RGL_SPECIFIC_CHANGES
@@ -558,7 +554,7 @@ S16 SSetMBufPool(Buffer *mBuf, Pool pool)
     minfo = (SsMsgInfo*) mBuf->b_rptr; 
     minfo->pool   = pool;
 
-    RETVALUE(ROK);
+    return ROK;
 } 
 #endif
 
@@ -582,34 +578,34 @@ S16 SSetMBufPool(Buffer *mBuf, Pool pool)
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT 
 #ifdef ANSI
-PUBLIC S16 SPutMsgNew
+S16 SPutMsgNew
 (
 Buffer *mBuf,
-U32    line,
-U8     *fileName
+uint32_t    line,
+uint8_t     *fileName
 )
 #else
-PUBLIC S16 SPutMsgNew(mBuf, line, fileName)
+S16 SPutMsgNew(mBuf, line, fileName)
 Buffer *mBuf;
-U32    line;
-U8     *fileName;
+uint32_t    line;
+uint8_t     *fileName;
 #endif
 #else /* SS_HISTOGRAM_SUPPORT */
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SPutMsgNew
+S16 SPutMsgNew
 (
 Buffer *mBuf,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SPutMsg
+S16 SPutMsg
 (
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SPutMsg(mBuf)
+S16 SPutMsg(mBuf)
 Buffer *mBuf;
 #endif
 #endif
@@ -618,7 +614,7 @@ Buffer *mBuf;
    Buffer *tmp;
    SsMsgInfo *minfo;
 #ifdef SS_MEM_WL_DEBUG
-   U8     tmpThrReg;
+   uint8_t     tmpThrReg;
 #endif
 
 /* ss001.301: additions */
@@ -626,8 +622,6 @@ Buffer *mBuf;
        Ent entId = 0;
 #endif /* SS_HISTOGRAM_SUPPORT */
 
-   TRC1(SPutMsgNew)
-
 #ifdef L2_OPTMZ
 //#ifdef RADIO_CLUSTER
       if(clusterMode == RADIO_CLUSTER_MODE)
@@ -638,7 +632,7 @@ Buffer *mBuf;
          }
          if (mBuf->refCnt > 0)
          {
-            RETVALUE(ROK);
+            return ROK;
          }
       }
 #endif
@@ -653,24 +647,18 @@ Buffer *mBuf;
          if(pthread_self() == gMacTId)
          //if(pthread_equal(pthread_self(),gMacTId))
          {
-#if 0
-#else
             if(ROK == mtAddBufToRing(SS_RNG_BUF_MAC_FREE_RING,(Void *)mBuf,0))
-#endif
             {
-               RETVALUE(ROK);
+               return ROK;
             }
          }
 #endif
 #ifdef RLC_FREE_RING_BUF
          else if(pthread_self() == gRlcTId)
          {
-#if 0
-#else
             if(ROK == mtAddBufToRing(SS_RNG_BUF_RLC_FREE_RING,(Void *)mBuf,0))
-#endif
             {
-               RETVALUE(ROK);
+               return ROK;
             }
          }
 #endif
@@ -682,13 +670,13 @@ Buffer *mBuf;
    if (mBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS060, ERRZERO, "SPutMsg: Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS061, ERRZERO, "SPutMsg: Incorrect buffer\
                                                    type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -697,7 +685,7 @@ Buffer *mBuf;
    if(tmpThrReg == 0xFF)
    {
       printf("\n Not able to get region \n");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -732,7 +720,7 @@ Buffer *mBuf;
    if (SFree(minfo->region, (Data *) mBuf, MSGSIZE) == RFAILED)
 #endif
 #endif /* SS_HISTOGRAM_SUPPORT */
-      RETVALUE(RFAILED);
+      return RFAILED;
 #else /* SS_M_PROTO_REGION */
    /* ss021.103 - Addition to check return value of SFree */
 #ifdef SS_HISTOGRAM_SUPPORT
@@ -740,10 +728,10 @@ Buffer *mBuf;
 #else
    if (SFree(minfo->region, (Data *) mBuf, MSGSIZE) == RFAILED)
 #endif /* SS_HISTOGRAM_SUPPORT */
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif /* SS_M_PROTO_REGION */
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 #ifdef SS_LOCKLESS_MEMORY
@@ -764,66 +752,64 @@ Buffer *mBuf;
 */
 /* ss001.301: additions */
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SPutStaticBufferNew
+S16 SPutStaticBufferNew
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data *ptr,                      /* pointer to buffer */
 Size size,                      /* size */
-U8   memType,                    /* memory type used if shareable or not */
+uint8_t   memType,                    /* memory type used if shareable or not */
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SPutStaticBuffer
+S16 SPutStaticBuffer
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data *ptr,                      /* pointer to buffer */
 Size size,                      /* size */
-U8   memType                    /* memory type used if shareable or not */
+uint8_t   memType                    /* memory type used if shareable or not */
 )
 #else
-PUBLIC S16 SPutStaticBuffer(region, pool, ptr, size)
+S16 SPutStaticBuffer(region, pool, ptr, size)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Data *ptr;                      /* pointer to buffer */
 Size size;                      /* size */
-U8   memType;                   /* memory type used if shareable or not */
+uint8_t   memType;                   /* memory type used if shareable or not */
 #endif
 #endif
 {
    S16 ret = RFAILED;
 
-   TRC1(SPutStaticBuffer);
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* validate region ID */
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS220, region, "Invalid region");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* validate pool ID */
    if (pool >= SS_MAX_POOLS_PER_REG)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS221, pool, "Invalid pool");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* validate data pointer */
    if (ptr == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS223, (ErrVal)0, "NULL data pointe");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* validate size */
    if (size <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS224, size, "Invalid size");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 #if (defined (MAC_FREE_RING_BUF) || defined (RLC_FREE_RING_BUF))
@@ -836,24 +822,18 @@ U8   memType;                   /* memory type used if shareable or not */
          if(pthread_self() == gMacTId)
          //if(pthread_equal(pthread_self(),gMacTId))
          {
-#if 0
-#else
             if(ROK == mtAddBufToRing(SS_RNG_BUF_MAC_FREE_RING,(Void *)ptr,1))
-#endif
             {
-               RETVALUE(ROK);
+               return ROK;
             }
          }
 #endif
 #ifdef RLC_FREE_RING_BUF
          else if(pthread_self() == gRlcTId)
          {
-#if 0
-#else
             if(ROK == mtAddBufToRing(SS_RNG_BUF_RLC_FREE_RING,(Void *)ptr,1))
-#endif
             {
-               RETVALUE(ROK);
+               return ROK;
             }
          }
       }
@@ -871,7 +851,7 @@ U8   memType;                   /* memory type used if shareable or not */
        (osCp.dynRegionTbl[region].used == FALSE)))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS218, region, "Region not registered");
-      RETVALUE(ret);
+      return (ret);
    }
 #endif
 
@@ -903,7 +883,7 @@ U8   memType;                   /* memory type used if shareable or not */
    }
 #endif
 
-   RETVALUE(ret);
+   return (ret);
 }
 
 /*
@@ -925,67 +905,65 @@ U8   memType;                   /* memory type used if shareable or not */
 *
 */
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SGetStaticBufferNew
+S16 SGetStaticBufferNew
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data **ptr,                     /* pointer to buffer */
 Size size,                      /* size requested */
-U8   memType,                    /* memory type used if shareable or not */
+uint8_t   memType,                    /* memory type used if shareable or not */
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SGetStaticBuffer
+S16 SGetStaticBuffer
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data **ptr,                     /* pointer to buffer */
 Size size,                      /* size requested */
-U8   memType                    /* memory type used if shareable or not */
+uint8_t   memType                    /* memory type used if shareable or not */
 )
 #else
-PUBLIC S16 SGetStaticBuffer(region, pool, ptr, size)
+S16 SGetStaticBuffer(region, pool, ptr, size)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Data **ptr;                     /* pointer to buffer */
 Size size;                      /* size requested */
-U8   memType;                   /* memory type used if shareable or not */
+uint8_t   memType;                   /* memory type used if shareable or not */
 #endif
 #endif
 {
    S16 ret = RFAILED;
-   U32 flags;
-
-   TRC1(SGetStaticBuffer);
+   uint32_t flags;
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* validate region ID */
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS211, region, "Invalid region");
-      RETVALUE(ret);
+      return (ret);
    }
 
    /* validate pool ID */
    if (pool >= SS_MAX_POOLS_PER_REG)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS212, pool, "Invalid pool");
-      RETVALUE(ret);
+      return (ret);
    }
    /* validate data pointer */
    if (ptr == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS214, (ErrVal)0 , "NULL data pointer");
-      RETVALUE(ret);
+      return (ret);
    }
 
    /* validate size */
    if (size <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS215, size, "Invalid size");
-      RETVALUE(ret);
+      return (ret);
    }
 #endif
 
@@ -997,7 +975,7 @@ U8   memType;                   /* memory type used if shareable or not */
        (osCp.dynRegionTbl[region].used == FALSE)))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS218, region, "Region not registered");
-      RETVALUE(ret);
+      return (ret);
    }
 #endif
 
@@ -1035,54 +1013,54 @@ U8   memType;                   /* memory type used if shareable or not */
    }
 #endif
 
-   RETVALUE(ret);
+   return (ret);
 }
 #endif /* SS_LOCKLESS_MEMORY */
 
 #ifdef INTEL_WLS 
 #ifndef SS_LOCKLESS_MEMORY
 #ifdef ANSI
-PUBLIC S16 SGetStaticBuffer
+S16 SGetStaticBuffer
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data **ptr,                     /* pointer to buffer */
 Size size,                      /* size requested */
-U8   memType                    /* memory type used if shareable or not */
+uint8_t   memType                    /* memory type used if shareable or not */
 )
 #else
-PUBLIC S16 SGetStaticBuffer(region, pool, ptr, size)
+S16 SGetStaticBuffer(region, pool, ptr, size)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Data **ptr;                     /* pointer to buffer */
 Size size;                      /* size requested */
-U8   memType;                   /* memory type used if shareable or not */
+uint8_t   memType;                   /* memory type used if shareable or not */
 #endif
 {
     S16  ret;
 
     ret = SGetSBuf(region, pool, ptr, size);
 
-    RETVALUE(ret);
+    return (ret);
 }
 
 
 #ifdef ANSI
-PUBLIC S16 SPutStaticBuffer
+S16 SPutStaticBuffer
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data *ptr,                      /* pointer to buffer */
 Size size,                      /* size */
-U8   memType                    /* memory type used if shareable or not */
+uint8_t   memType                    /* memory type used if shareable or not */
 )
 #else
-PUBLIC S16 SPutStaticBuffer(region, pool, ptr, size)
+S16 SPutStaticBuffer(region, pool, ptr, size)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Data *ptr;                      /* pointer to buffer */
 Size size;                      /* size */
-U8   memType;                   /* memory type used if shareable or not */
+uint8_t   memType;                   /* memory type used if shareable or not */
 #endif
 {
 
@@ -1090,22 +1068,22 @@ U8   memType;                   /* memory type used if shareable or not */
  
    ret = SPutSBuf(region, pool, ptr, size);
 
-   RETVALUE(ret);
+   return (ret);
 
 }
 #endif
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SGetSBufWls1
+S16 SGetSBufWls1
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data **ptr,                     /* pointer to buffer */
 Size size,                       /* size requested */
 char* file,
-U32 line
+uint32_t line
 )
 #else
-PUBLIC S16 SGetSBufWls
+S16 SGetSBufWls
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
@@ -1115,7 +1093,9 @@ Size size                       /* size requested */
 #endif
 {
     S16   ret;
-    U32   flags = 0;
+#ifndef SS_LOCKLESS_MEMORY
+    uint32_t   flags = 0;
+#endif
 
 #ifdef SS_LOCKLESS_MEMORY
     region = SS_GET_THREAD_MEM_REGION();
@@ -1131,21 +1111,21 @@ Size size                       /* size requested */
 #endif
 #endif
 
-    RETVALUE(ret);
+    return (ret);
 }
 
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SPutSBufWls1
+S16 SPutSBufWls1
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data *ptr,                      /* pointer to buffer */
 Size size,                      /* size */
 char* file,
-U32 line
+uint32_t line
 )
 #else
-PUBLIC S16 SPutSBufWls
+S16 SPutSBufWls
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
@@ -1168,7 +1148,7 @@ Size size                      /* size */
 #endif
 #endif
 
-   RETVALUE(ret);
+   return (ret);
 }
 
 #endif  /* INTEL_WLS */
@@ -1194,48 +1174,48 @@ Size size                      /* size */
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT
 #ifdef ANSI
-PUBLIC S16 SGetSBufNew
+S16 SGetSBufNew
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data **ptr,                     /* pointer to buffer */
 Size size,                       /* size requested */
-U32    line,
-U8     *fileName
+uint32_t    line,
+uint8_t     *fileName
 )
 #else
-PUBLIC S16 SGetSBufNew(region, pool, ptr, size, line, fileName)
+S16 SGetSBufNew(region, pool, ptr, size, line, fileName)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Data **ptr;                     /* pointer to buffer */
 Size size;                      /* size requested */
-U32    line;
-U8     *fileName;
+uint32_t    line;
+uint8_t     *fileName;
 #endif
 #else /* SS_HISTOGRAM_SUPPORT */
 #if (defined(SSI_STATIC_MEM_LEAK_DETECTION) || defined(T2K_MEM_LEAK_DBG))
 #ifdef ANSI
-PUBLIC S16 SGetSBuf1
+S16 SGetSBuf1
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data **ptr,                     /* pointer to buffer */
 Size size,                       /* size requested */
 char* file,
-U32 line
+uint32_t line
 )
 #else
-PUBLIC S16 SGetSBuf1(region, pool, ptr, size, file, line)
+S16 SGetSBuf1(region, pool, ptr, size, file, line)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Data **ptr;                     /* pointer to buffer */
 Size size;                      /* size requested */
 char* file;
-U32 line;
+uint32_t line;
 #endif
 #else
 #ifdef ANSI
-PUBLIC S16 SGetSBuf
+S16 SGetSBuf
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
@@ -1243,7 +1223,7 @@ Data **ptr,                     /* pointer to buffer */
 Size size                       /* size requested */
 )
 #else
-PUBLIC S16 SGetSBuf(region, pool, ptr, size)
+S16 SGetSBuf(region, pool, ptr, size)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Data **ptr;                     /* pointer to buffer */
@@ -1253,7 +1233,7 @@ Size size;                      /* size requested */
 #endif /* SS_HISTOGRAM_SUPPORT */
 {
    S16 ret;
-   U32 flags;
+   uint32_t flags;
 #ifdef SSI_STATIC_MEM_LEAK_DETECTION
    Size tmpSize;
 #endif
@@ -1263,7 +1243,6 @@ Size size;                      /* size requested */
        Bool hstReg = FALSE;
 #endif /* SS_HISTOGRAM_SUPPORT */
 
-   TRC1(SGetSBufNew);
 
    region = SS_GET_THREAD_MEM_REGION();
 #ifdef INTEL_WLS
@@ -1275,28 +1254,28 @@ Size size;                      /* size requested */
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS211, region, "Invalid region");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* validate pool ID */
    if (pool >= SS_MAX_POOLS_PER_REG)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS212, pool, "Invalid pool");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 /* ss008.13: addition */
    /* validate data pointer */
    if (ptr == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS214, (ErrVal)0 , "NULL data pointer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* validate size */
    if (size <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS215, size, "Invalid size");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 /* ss037.103 Removed the semaphore operation for performance enhancement */
@@ -1315,7 +1294,7 @@ Size size;                      /* size requested */
                   "Could not lock region table");
 #endif
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #endif
@@ -1332,12 +1311,12 @@ Size size;                      /* size requested */
 #if (ERRCLASS & ERRCLS_DEBUG)
          SSLOGERROR(ERRCLS_DEBUG, ESS217, ERRZERO,
                   "Could not release semaphore");
-         RETVALUE(RFAILED);
+         return RFAILED;
 #endif
       }
 
       SSLOGERROR(ERRCLS_INT_PAR, ESS218, region, "Region not registered");
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif
    }
 #endif
@@ -1393,14 +1372,14 @@ Size size;                      /* size requested */
 #ifdef XEON_SPECIFIC_CHANGES
       pthread_mutex_lock(&(memLock));
 #endif      
-      U32 idx = GetNextFreeIdx(&SMemLeakInfo[region]);
-      U8* allocatedPtr = *ptr;
+      uint32_t idx = GetNextFreeIdx(&SMemLeakInfo[region]);
+      uint8_t* allocatedPtr = *ptr;
       void* actualPtr = allocatedPtr + 4;
       *ptr = actualPtr;
       /* store the index in the memory allocated itself */
-      /**((U32*)*((U32*)allocatedPtr)) = idx;*/
-      *((U32*)allocatedPtr) = idx;
-      /*printf("region = %d idx = %d ptr = %p *ptr = %p actual = %p allocated = %p content = %d\n",region, idx, ptr, *ptr, actualPtr, allocatedPtr, *((U32*)allocatedPtr));*/
+      /**((uint32_t*)*((uint32_t*)allocatedPtr)) = idx;*/
+      *((uint32_t*)allocatedPtr) = idx;
+      /*printf("region = %d idx = %d ptr = %p *ptr = %p actual = %p allocated = %p content = %d\n",region, idx, ptr, *ptr, actualPtr, allocatedPtr, *((uint32_t*)allocatedPtr));*/
 
       LogForStaticMemLeak(&SMemLeakInfo[region],
                           file,
@@ -1435,7 +1414,7 @@ Size size;                      /* size requested */
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS219, ERRZERO,
                   "Could not release semaphore");
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif
    }
 #endif
@@ -1449,7 +1428,7 @@ Size size;                      /* size requested */
     }
 #endif /* SSI_DEBUG_LEVEL1 */
 
-   RETVALUE(ret);
+   return (ret);
 }
 
 \f
@@ -1471,48 +1450,48 @@ Size size;                      /* size requested */
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT
 #ifdef ANSI
-PUBLIC S16 SPutSBufNew
+S16 SPutSBufNew
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data *ptr,                      /* pointer to buffer */
 Size size,                      /* size */
-U32    line,
-U8     *fileName
+uint32_t    line,
+uint8_t     *fileName
 )
 #else
-PUBLIC S16 SPutSBufNew(region, pool, ptr, size, line, fileName)
+S16 SPutSBufNew(region, pool, ptr, size, line, fileName)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Data *ptr;                      /* pointer to buffer */
 Size size;                      /* size */
-U32    line;
-U8     *fileName;
+uint32_t    line;
+uint8_t     *fileName;
 #endif
 #else  /* SS_HISTOGRAM_SUPPORT  */
 #if (defined(SSI_STATIC_MEM_LEAK_DETECTION) || defined(T2K_MEM_LEAK_DBG))
 #ifdef ANSI
-PUBLIC S16 SPutSBuf1
+S16 SPutSBuf1
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Data *ptr,                      /* pointer to buffer */
 Size size,                      /* size */
 char* file,
-U32 line
+uint32_t line
 )
 #else
-PUBLIC S16 SPutSBuf1(region, pool, ptr, size, file, line)
+S16 SPutSBuf1(region, pool, ptr, size, file, line)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Data *ptr;                      /* pointer to buffer */
 Size size;                      /* size */
 char* file;
-U32 line;
+uint32_t line;
 #endif
 #else
 #ifdef ANSI
-PUBLIC S16 SPutSBuf
+S16 SPutSBuf
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
@@ -1520,7 +1499,7 @@ Data *ptr,                      /* pointer to buffer */
 Size size                      /* size */
 )
 #else
-PUBLIC S16 SPutSBuf(region, pool, ptr, size)
+S16 SPutSBuf(region, pool, ptr, size)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Data *ptr;                      /* pointer to buffer */
@@ -1536,9 +1515,6 @@ Size size;                      /* size */
        Bool hstReg = FALSE;
 #endif /* SS_HISTOGRAM_SUPPORT */
 
-   TRC1(SPutSBufNew);
-
-
    region = SS_GET_THREAD_MEM_REGION();
 #if (!defined(SS_LOCKLESS_MEMORY) && defined(INTEL_WLS))
    region = 1;
@@ -1549,28 +1525,28 @@ Size size;                      /* size */
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS220, region, "Invalid region");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* validate pool ID */
    if (pool >= SS_MAX_POOLS_PER_REG)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS221, pool, "Invalid pool");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 /* ss008.13: addition */
    /* validate data pointer */
    if (ptr == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS223, (ErrVal)0, "NULL data pointe");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* validate size */
    if (size <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS224, size, "Invalid size");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 /* ss037.103 Removed the semaphore operation for performance enhancement */
@@ -1588,7 +1564,7 @@ Size size;                      /* size */
                   "Could not lock region table");
 #endif
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -1604,12 +1580,12 @@ Size size;                      /* size */
 #if (ERRCLASS & ERRCLS_DEBUG)
          SSLOGERROR(ERRCLS_DEBUG, ESS226, ERRZERO,
                   "Could not release semaphore");
-         RETVALUE(RFAILED);
+         return RFAILED;
 #endif
       }
 #endif
       SSLOGERROR(ERRCLS_INT_PAR, ESS227, region, "Region not registered");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -1619,7 +1595,7 @@ Size size;                      /* size */
 #ifdef XEON_SPECIFIC_CHANGES
       pthread_mutex_lock(&(memLock));
 #endif      
-      U32 idx = *((U32*)((U8 *)ptr - 4));
+      uint32_t idx = *((uint32_t*)((uint8_t *)ptr - 4));
       FreeIdx(ptr,idx,&SMemLeakInfo[region],size,file,line);
 #ifdef XEON_SPECIFIC_CHANGES
       pthread_mutex_unlock(&(memLock));
@@ -1665,7 +1641,7 @@ Size size;                      /* size */
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS228, ERRZERO,
                   "Could not release semaphore");
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif
    }
 #endif
@@ -1680,7 +1656,7 @@ Size size;                      /* size */
     }
 #endif /* SSI_DEBUG_LEVEL1 */
 
-   RETVALUE(ret);
+   return (ret);
 }
 
 
@@ -1703,33 +1679,31 @@ Size size;                      /* size */
 */
 
 #ifdef ANSI
-PUBLIC S16 SInitMsg
+S16 SInitMsg
 (
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SInitMsg(mBuf)
+S16 SInitMsg(mBuf)
 Buffer *mBuf;
 #endif
 {
    SsMsgInfo *minfo;
    Buffer *tmp;
-   U8     tmpRegId;
-
-   TRC1(SInitMsg)
+   uint8_t     tmpRegId;
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer */
    if (mBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS062, ERRZERO, "SInitMsg: Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS063, ERRZERO, "SInitMsg: Incorrect buffer\
                                                    type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -1739,7 +1713,7 @@ Buffer *mBuf;
    CM_MEM_GET_REGION(tmpRegId);
    if(tmpRegId == 0xFF)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
    minfo = (SsMsgInfo*) mBuf->b_rptr;
@@ -1752,7 +1726,7 @@ Buffer *mBuf;
 #if 1
 #ifdef T2K_MEM_LEAK_DBG
    char * file = __FILE__;
-   U32  line   = __LINE__;
+   uint32_t  line   = __LINE__;
 #endif
 
       (Void) SPutDBuf(tmpRegId, minfo->pool, tmp);
@@ -1766,7 +1740,7 @@ Buffer *mBuf;
    minfo->endptr = NULLP;
    minfo->next = NULLP;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /* ss016.301 - Added a new API - SAddPreMsgMultInOrder. This preserves the
@@ -1794,14 +1768,14 @@ Buffer *mBuf;
 *
 */
 #ifdef ANSI
-PUBLIC S16 SAddPreMsgMultInOrder
+S16 SAddPreMsgMultInOrder
 (
  Data *src,
  MsgLen cnt,
  Buffer *mBuf
  )
 #else
-PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf)
+S16 SAddPreMsgMultInOrder(src, cnt, mBuf)
     Data *src;
     MsgLen cnt;
     Buffer *mBuf;
@@ -1817,7 +1791,6 @@ PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf)
    MsgLen offset;
    Data *rptr;
    Data *revSrc;
-   TRC1(SAddPreMsgMultInOrder)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
       /* check message buffer */
@@ -1825,27 +1798,27 @@ PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS070, ERRZERO, "SAddPreMsgMultInOrder:\
                                                    Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check source */
    if (src == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS071, ERRZERO, "SAddPreMsgMultInOrder:\
                                                    Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check count */
    if (cnt <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS072, ERRZERO, "SAddPreMsgMultInOrder:\
                                                    Invalid count");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS073, ERRZERO, "SAddPreMsgMultInOrder:\
                                                    Incorrect buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -1885,7 +1858,7 @@ PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf)
       if (!cnt)
       {
          minfo->len += len;
-         RETVALUE(ROK);
+         return ROK;
       }
    }
    newblk = prevblk = NULLP;
@@ -1899,7 +1872,7 @@ PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf)
             prevblk = prevblk->b_cont;
 #ifdef T2K_MEM_LEAK_DBG
    char * file = __FILE__;
-   U32  line   = __LINE__;
+   uint32_t  line   = __LINE__;
 #endif
 
             (Void) SPutDBuf(minfo->region, minfo->pool, curblk);
@@ -1910,7 +1883,7 @@ PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf)
             tmp->b_rptr = tmp->b_datap->db_base + offset;
          }
 
-         RETVALUE(ROUTRES);
+         return (ROUTRES);
       }
       /* attach curblk in the newblk chain */
       if (prevblk)
@@ -1957,7 +1930,7 @@ PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf)
    /* update length of message */
    minfo->len += len;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 /*
 *
@@ -1983,13 +1956,13 @@ PUBLIC S16 SAddPreMsgMultInOrder(src, cnt, mBuf)
 
  
 #ifdef ANSI
-PUBLIC S16 SAddPreMsg
+S16 SAddPreMsg
 (
 Data data,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SAddPreMsg (data, mBuf)
+S16 SAddPreMsg (data, mBuf)
 Data data;
 Buffer *mBuf;
 #endif
@@ -1998,20 +1971,18 @@ Buffer *mBuf;
    Buffer *tmp;
    Buffer *newb;
 
-   TRC1(SAddPreMsg)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer */
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS064, ERRZERO, "SAddPreMsg: Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS065, ERRZERO, "SAddPreMsg: Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED)
+      return RFAILED
    }
 #endif
 
@@ -2024,7 +1995,7 @@ Buffer *mBuf;
    if (minfo->len == 0x7FFF)
 #endif
    {
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
       
    /*
@@ -2040,7 +2011,7 @@ Buffer *mBuf;
       {
          SSLOGERROR(ERRCLS_DEBUG, ESS066, ERRZERO, "SAddPreMsg:Failed in\
                     SGetDBuf");
-         RETVALUE(ROUTRES);
+         return (ROUTRES);
       }
       /* set the read and write pointers to end of data buffer */
       /* subsequent prepends have all the buffer to insert data into */
@@ -2060,7 +2031,7 @@ Buffer *mBuf;
    *--tmp->b_rptr = data;
    minfo->len++;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -2087,13 +2058,13 @@ Buffer *mBuf;
 
  
 #ifdef ANSI
-PUBLIC S16 SAddPstMsg
+S16 SAddPstMsg
 (
 Data data,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SAddPstMsg (data, mBuf)
+S16 SAddPstMsg (data, mBuf)
 Data data;
 Buffer *mBuf;
 #endif
@@ -2101,21 +2072,19 @@ Buffer *mBuf;
    SsMsgInfo *minfo;
    Buffer *tmp;
    Buffer *newb;
-   TRC1(SAddPstMsg)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer */
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS067, ERRZERO, "SAddPstMsg: Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS068, ERRZERO, "SAddPstMsg: Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -2129,7 +2098,7 @@ Buffer *mBuf;
       {
          SSLOGERROR(ERRCLS_DEBUG, ESS069, ERRZERO, "SAddPstMsg: Failed in\
                                                     SGetDBuf()");
-         RETVALUE(ROUTRES);
+         return (ROUTRES);
       }
 
       /* append newb to the end of the mBuf chain */
@@ -2147,7 +2116,7 @@ Buffer *mBuf;
    *tmp->b_wptr++ = data;
    minfo->len++;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -2179,25 +2148,25 @@ Buffer *mBuf;
 */
  
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SAddPreMsgMult1
+S16 SAddPreMsgMult1
 (
 Data *src,
 MsgLen cnt,
 Buffer *mBuf,
 char   *file,
-U32    line
+uint32_t    line
 )
 
 #else
 #ifdef ANSI
-PUBLIC S16 SAddPreMsgMult
+S16 SAddPreMsgMult
 (
 Data *src,
 MsgLen cnt,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SAddPreMsgMult(src, cnt, mBuf)
+S16 SAddPreMsgMult(src, cnt, mBuf)
 Data *src;
 MsgLen cnt;
 Buffer *mBuf;
@@ -2214,33 +2183,31 @@ Buffer *mBuf;
    MsgLen offset;
    Data *rptr;
 
-   TRC1(SAddPreMsgMult)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer */
    if (mBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS070, ERRZERO, "SAddPreMsgMult:Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check source */
    if (src == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS071, ERRZERO, "SAddPreMsgMult:Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check count */
    if (cnt <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS072, ERRZERO, "SAddPreMsgMult: Invalid\
                                                    count");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS073, ERRZERO, "SAddPreMsgMult: Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -2270,7 +2237,7 @@ Buffer *mBuf;
       if (!cnt)
       {
          minfo->len += len;
-         RETVALUE(ROK);
+         return ROK;
       }
    }
    newblk = prevblk = NULLP;
@@ -2290,7 +2257,7 @@ Buffer *mBuf;
             tmp->b_rptr = tmp->b_datap->db_base + offset;
          }
 
-         RETVALUE(ROUTRES);
+         return (ROUTRES);
       }
       /* attach curblk in the newblk chain */
       if (prevblk)
@@ -2326,7 +2293,7 @@ Buffer *mBuf;
    /* update length of message */
    minfo->len += len;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -2358,24 +2325,24 @@ Buffer *mBuf;
 */
 
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SAddPstMsgMult1
+S16 SAddPstMsgMult1
 (
 Data *src,
 MsgLen cnt,
 Buffer *mBuf,
 char   *file,
-U32    line
+uint32_t    line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SAddPstMsgMult
+S16 SAddPstMsgMult
 (
 Data *src,
 MsgLen cnt,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SAddPstMsgMult(src, cnt, mBuf)
+S16 SAddPstMsgMult(src, cnt, mBuf)
 Data *src;
 MsgLen cnt;
 Buffer *mBuf;
@@ -2392,33 +2359,31 @@ Buffer *mBuf;
    MsgLen numBytes;
    Data *wptr;
 
-   TRC1(SAddPstMsgMult)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer */
    if (mBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS074, ERRZERO, "SAddPstMsgMult:Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check source */
    if (src == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS075, ERRZERO, "SAddPstMsgMult:Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check count */
    if (cnt <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS076, ERRZERO, "SAddPstMsgMult:Invalid\
                                                    count");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS077, ERRZERO, "SAddPstMsgMult: Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
  
@@ -2456,7 +2421,7 @@ Buffer *mBuf;
       if (!cnt)
       {
          minfo->len += len;
-         RETVALUE(ROK);
+         return ROK;
       }
    }
 
@@ -2478,7 +2443,7 @@ Buffer *mBuf;
             tmp->b_wptr = tmp->b_datap->db_lim - offset;
          }
 
-         RETVALUE(ROUTRES);
+         return (ROUTRES);
       }
 
       /* insert curblk in the newblk chain */
@@ -2514,7 +2479,7 @@ Buffer *mBuf;
    /* update length */
    minfo->len += len;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /* #ifdef SS_LOCKLESS_MEMORY */
@@ -2545,13 +2510,13 @@ Buffer *mBuf;
 
  
 #ifdef ANSI
-PUBLIC S16 SRemPreMsg
+S16 SRemPreMsg
 (
 Data *dataPtr,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SRemPreMsg(dataPtr, mBuf)
+S16 SRemPreMsg(dataPtr, mBuf)
 Data *dataPtr;
 Buffer *mBuf;
 #endif
@@ -2560,34 +2525,32 @@ Buffer *mBuf;
    Buffer *tmp;
 #ifdef T2K_MEM_LEAK_DBG
    char* file = __FILE__;
-   U32 line = __LINE__;
+   uint32_t line = __LINE__;
 #endif
 
-   TRC1(SRemPreMsg)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check data pointer */
    if (!dataPtr)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS078, ERRZERO, "SRemPreMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check message buffer */
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS079, ERRZERO, "SRemPreMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS080, ERRZERO, "SRemPreMsg : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
    if (!(tmp = mBuf->b_cont))
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
 
    /* get SsMsgInfo of mBuf */
    minfo = (SsMsgInfo *) mBuf->b_rptr;
@@ -2605,7 +2568,7 @@ Buffer *mBuf;
    if (!--minfo->len)
       minfo->endptr = NULLP;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -2632,13 +2595,13 @@ Buffer *mBuf;
 
 
 #ifdef ANSI
-PUBLIC S16 SRemPstMsg
+S16 SRemPstMsg
 (
 Data *dataPtr,              /* pointer to data */
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SRemPstMsg(dataPtr, mBuf)
+S16 SRemPstMsg(dataPtr, mBuf)
 Data *dataPtr;              /* pointer to data */
 Buffer *mBuf;               /* message buffer */
 #endif
@@ -2648,29 +2611,27 @@ Buffer *mBuf;               /* message buffer */
    Buffer *last;
 #ifdef T2K_MEM_LEAK_DBG
    char* file = __FILE__;
-   U32 line = __LINE__;
+   uint32_t line = __LINE__;
 #endif
 
-   TRC1(SRemPstMsg)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check data pointer */
    if (dataPtr == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS081, ERRZERO, "SRemPstMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check message buffer */
    if (mBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS082, ERRZERO, "SRemPstMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS083, ERRZERO, "SRemPstMsg : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -2678,7 +2639,7 @@ Buffer *mBuf;               /* message buffer */
    minfo = (SsMsgInfo*) mBuf->b_rptr;
 
    if (!(last = minfo->endptr))
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
 
    /* read databyte into dataPtr and decrement write ptr */
    *dataPtr = *--last->b_wptr;
@@ -2700,7 +2661,7 @@ Buffer *mBuf;               /* message buffer */
    /* update SsMsgInfo */
    minfo->len--;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 
@@ -2734,14 +2695,14 @@ Buffer *mBuf;               /* message buffer */
 */
 
 #ifdef ANSI
-PUBLIC S16 SRemPreMsgMult
+S16 SRemPreMsgMult
 (
 Data *dst,                  /* destination */
 MsgLen cnt,                 /* count */
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SRemPreMsgMult(dst, cnt, mBuf)
+S16 SRemPreMsgMult(dst, cnt, mBuf)
 Data *dst;                  /* destination */
 MsgLen cnt;                 /* count */
 Buffer *mBuf;               /* message buffer */
@@ -2752,10 +2713,9 @@ Buffer *mBuf;               /* message buffer */
    MsgLen numBytes;
 #ifdef T2K_MEM_LEAK_DBG
    char* file = __FILE__;
-   U32 line = __LINE__;
+   uint32_t line = __LINE__;
 #endif
 
-   TRC1(SRemPreMsgMult)
 
    /* ss023.103 - Modification of SRemPreMsgMult for bug fix */
 
@@ -2765,13 +2725,13 @@ Buffer *mBuf;               /* message buffer */
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS084, ERRZERO, "SRemPreMsgMult:Invalid\
                                                    count");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check message buffer */
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS085, ERRZERO, "SRemPreMsgMult:Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* ss021.103 - Addition to check for NULL pointer */
    /* check data pointer */
@@ -2780,7 +2740,7 @@ Buffer *mBuf;               /* message buffer */
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS086, ERRZERO, "SRemPreMsgMult : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -2789,7 +2749,7 @@ Buffer *mBuf;               /* message buffer */
 
    /* check if data present */
    if (minfo->len < cnt)
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    else
       minfo->len -= cnt;
 
@@ -2824,7 +2784,7 @@ Buffer *mBuf;               /* message buffer */
    if (!minfo->len)
       minfo->endptr = NULLP;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -2857,14 +2817,14 @@ Buffer *mBuf;               /* message buffer */
 */
 
 #ifdef ANSI
-PUBLIC S16 SRemPstMsgMult
+S16 SRemPstMsgMult
 (
 Data *dst,                  /* destination */
 MsgLen cnt,                 /* count */
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SRemPstMsgMult(dst, cnt, mBuf)
+S16 SRemPstMsgMult(dst, cnt, mBuf)
 Data *dst;                  /* destination */
 MsgLen cnt;                 /* count */
 Buffer *mBuf;               /* message buffer */
@@ -2878,10 +2838,9 @@ Buffer *mBuf;               /* message buffer */
    Data *cptr;
 #ifdef T2K_MEM_LEAK_DBG
    char* file = __FILE__;
-   U32 line = __LINE__;
+   uint32_t line = __LINE__;
 #endif
 
-   TRC1(SRemPstMsgMult)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check count */
@@ -2889,19 +2848,19 @@ Buffer *mBuf;               /* message buffer */
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS087, ERRZERO, "SRemPstMsgMult:Invalid\
                                                    count");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check message buffer */
    if (mBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS088, ERRZERO, "SRemPstMsgMult:Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS089, ERRZERO, "SRemPstMsgMult : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* ss021.103 - Addition to check dst data pointer */
    /* check data pointer */
@@ -2913,7 +2872,7 @@ Buffer *mBuf;               /* message buffer */
  
    /* check if data present */
    if (minfo->len < cnt)
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    else
    {
       minfo->len -= cnt;
@@ -2960,7 +2919,7 @@ Buffer *mBuf;               /* message buffer */
    else
       minfo->endptr = prev;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -2992,14 +2951,14 @@ Buffer *mBuf;               /* message buffer */
 
 
 #ifdef ANSI
-PUBLIC S16 SExamMsg
+S16 SExamMsg
 (
 Data *dataPtr,              /* pointer to data */
 Buffer *mBuf,               /* message buffer */
 MsgLen idx
 )
 #else
-PUBLIC S16 SExamMsg(dataPtr, mBuf, idx)
+S16 SExamMsg(dataPtr, mBuf, idx)
 Data *dataPtr;              /* pointer to data */
 Buffer *mBuf;               /* message buffer */
 MsgLen idx;                 /* index */
@@ -3008,32 +2967,30 @@ MsgLen idx;                 /* index */
    SsMsgInfo *minfo;
    Buffer *tmp;
 
-   TRC1(SExamMsg)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check data pointer */
    if (!dataPtr)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS090, ERRZERO, "SExamMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check message buffer */
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS091, ERRZERO, "SExamMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check index */
    if (idx < 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS092, ERRZERO, "SExamMsg : Invalid Index");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS093, ERRZERO, "SExamMsg : Incorrect buffer\
                                                    type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
  
@@ -3042,7 +2999,7 @@ MsgLen idx;                 /* index */
 
    if (minfo->len <= idx)
    {
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    }
 
    /* get the first SS_M_DATA blk */
@@ -3053,7 +3010,7 @@ MsgLen idx;                 /* index */
 
    *dataPtr = *(tmp->b_rptr + idx);
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 
@@ -3087,7 +3044,7 @@ MsgLen idx;                 /* index */
 
 
 #ifdef ANSI
-PUBLIC S16 SGetDataFrmMsg 
+S16 SGetDataFrmMsg 
 (
 Buffer *mBuf,               /* message buffer */
 Data *dataPtr,              /* pointer to data */
@@ -3095,7 +3052,7 @@ MsgLen idx,
 MsgLen dataLen
 )
 #else
-PUBLIC S16 SGetDataFrmMsg(mBuf, dataPtr, idx, dataLen)
+S16 SGetDataFrmMsg(mBuf, dataPtr, idx, dataLen)
 Buffer *mBuf;               /* message buffer */
 Data *dataPtr;              /* pointer to data */
 MsgLen idx;                 /* index */
@@ -3107,32 +3064,30 @@ MsgLen dataLen;
        MsgLen offSetLen;
        Data   *tmpDataPtr = dataPtr;
 
-   TRC1(SGetDataFrmMsg)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check data pointer */
    if (!dataPtr)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS090, ERRZERO, "SGetDataFrmMsg: Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check message buffer */
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS091, ERRZERO, "SGetDataFrmMsg: Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check index */
    if (idx < 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS092, ERRZERO, "SGetDataFrmMsg: Invalid Index");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS093, ERRZERO, "SGetDataFrmMsg: Incorrect buffer\
                                                    type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
  
@@ -3141,7 +3096,7 @@ MsgLen dataLen;
 
    if (minfo->len <= (idx + dataLen) )
    {
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    }
 
    /* get the first SS_M_DATA blk */
@@ -3150,7 +3105,7 @@ MsgLen dataLen;
    /* determine offset */
    if(tmp == NULLP)
        {
-               RETVALUE(ROKDNA);       
+               return (ROKDNA);        
        }
        else
        {
@@ -3168,12 +3123,12 @@ MsgLen dataLen;
          }
          if( tmp == NULLP )
          {
-           RETVALUE(ROKDNA);   
+           return (ROKDNA);    
          }
      SMemCpy((Void *)tmpDataPtr, (Void *)(tmp->b_rptr + idx), (size_t)dataLen);
        }
 
-   RETVALUE(ROK);
+   return ROK;
 } /* End of SGetDataFrmMsg() */
 
 /*
@@ -3195,39 +3150,37 @@ MsgLen dataLen;
 
 
 #ifdef ANSI
-PUBLIC S16 SFndLenMsg
+S16 SFndLenMsg
 (
 REG1 Buffer *mBuf,          /* message buffer */
 MsgLen *lngPtr
 )
 #else
-PUBLIC S16 SFndLenMsg(mBuf, lngPtr)
+S16 SFndLenMsg(mBuf, lngPtr)
 REG1 Buffer *mBuf;          /* message buffer */
 MsgLen *lngPtr;             /* pointer to length */
 #endif
 {
    SsMsgInfo *minfo;
 
-   TRC1(SFndLenMsg)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer */
    if (mBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS094, ERRZERO, "SFndLenMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check length pointer */
    if (lngPtr == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS095, ERRZERO, "SFndLenMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS096, ERRZERO, "SFndLenMsg : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
  
@@ -3237,7 +3190,7 @@ MsgLen *lngPtr;             /* pointer to length */
    /* read length */
    *lngPtr = minfo->len;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 
@@ -3280,24 +3233,24 @@ MsgLen *lngPtr;             /* pointer to length */
 *
 */
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SSegMsgNew
+S16 SSegMsgNew
 (
 Buffer *mBuf1,              /* message 1 */
 MsgLen idx,                 /* index */
 Buffer **mBuf2,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SSegMsg
+S16 SSegMsg
 (
 Buffer *mBuf1,              /* message 1 */
 MsgLen idx,                 /* index */
 Buffer **mBuf2
 )
 #else
-PUBLIC S16 SSegMsg(mBuf1, idx, mBuf2)
+S16 SSegMsg(mBuf1, idx, mBuf2)
 Buffer *mBuf1;              /* message 1 */
 MsgLen idx;                 /* index */
 Buffer **mBuf2;             /* message 2 */
@@ -3310,31 +3263,30 @@ Buffer **mBuf2;             /* message 2 */
    Buffer *prev;
    Buffer *next;
 
-   TRC1(SSegMsg)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer 1 */
    if (mBuf1 == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS097, ERRZERO, "SSegMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check message buffer 2 */
    if (mBuf2 == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS098, ERRZERO, "SSegMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (idx < 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS099, ERRZERO, "SSegMsg : Invalid index");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf1->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS100, ERRZERO, "SSegMsg : Incorrect buffer\
                                                    type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -3348,13 +3300,13 @@ Buffer **mBuf2;             /* message 2 */
    if (idx >= minfo1->len)
    {
       *mBuf2 = NULLP;
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    }
    /* allocate message buffer */
    if (SGetMsg(minfo1->region, minfo1->pool, mBuf2) != ROK)
    {
       SSLOGERROR(ERRCLS_DEBUG, ESS101, ERRZERO, "SSegMsg : SGetMsg failed");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* get the SsMsgInfo of mBuf2 */
@@ -3376,7 +3328,7 @@ Buffer **mBuf2;             /* message 2 */
       minfo1->endptr = NULLP;
       mBuf1->b_cont = NULLP;
 
-      RETVALUE(ROK);
+      return ROK;
    }
 
    /* get the first SS_M_DATA blk */
@@ -3406,7 +3358,7 @@ Buffer **mBuf2;             /* message 2 */
          /* reset length */
          minfo1->len += minfo2->len;
          (Void) SPutMsg(*mBuf2);
-         RETVALUE(ROUTRES);
+         return (ROUTRES);
       }
 
       (*mBuf2)->b_cont = next;
@@ -3444,7 +3396,7 @@ Buffer **mBuf2;             /* message 2 */
          /* reset length */
          minfo1->len += minfo2->len;
          (Void) SPutMsg(*mBuf2);
-         RETVALUE(ROUTRES);
+         return (ROUTRES);
       }
       (*mBuf2)->b_cont = next;
       tmp->b_wptr = tmp->b_rptr + idx;
@@ -3468,7 +3420,7 @@ Buffer **mBuf2;             /* message 2 */
 #endif /*SS_MULTICORE_SUPPORT*/
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -3488,7 +3440,7 @@ Buffer **mBuf2;             /* message 2 */
 */
 
 #ifdef ANSI
-PUBLIC S16 SCpyFixMsg
+S16 SCpyFixMsg
 (
 Data *srcBuf,               /* source buffer */
 Buffer *dstMbuf,            /* destination message buffer */
@@ -3497,7 +3449,7 @@ MsgLen cnt,                 /* count */
 MsgLen *cCnt
 )
 #else
-PUBLIC S16 SCpyFixMsg(srcBuf, dstMbuf, dstIdx, cnt, cCnt)
+S16 SCpyFixMsg(srcBuf, dstMbuf, dstIdx, cnt, cCnt)
 Data *srcBuf;               /* source buffer */
 Buffer *dstMbuf;            /* destination message buffer */
 MsgLen dstIdx;              /* destination index */
@@ -3509,38 +3461,36 @@ MsgLen *cCnt;               /* copied count */
    SsMsgInfo *minfo;
    Buffer *right;
 
-   TRC1(SCpyFixMsg)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check source message buffer */
    if (srcBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS102, ERRZERO, "SCpyFixMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check destination message buffer */
    if (dstMbuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS103, ERRZERO, "SCpyFixMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check copied count buffer */
    if (cCnt == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS104, ERRZERO, "SCpyFixMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check copy count */
    if (cnt <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS105, ERRZERO, "SCpyFixMsg : Invalid count");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (dstMbuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS106, ERRZERO, "SCpyFixMsg : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -3551,7 +3501,7 @@ MsgLen *cCnt;               /* copied count */
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS107, ERRZERO, "SCpyFixMsg : Invalid Index");
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 /* ss021.103 - Addition test if message length will exceed max msg length */
@@ -3565,7 +3515,7 @@ MsgLen *cCnt;               /* copied count */
       *cCnt = 0;
 
       SSLOGERROR(ERRCLS_INT_PAR, ESS108, ERRZERO, "SCpyFixMsg : msgLen + cnt > maxS16");
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
 #endif
    
@@ -3578,11 +3528,11 @@ MsgLen *cCnt;               /* copied count */
          SSLOGERROR(ERRCLS_DEBUG, ESS109, ERRZERO, "SCpyFixMsg : Failed in\
                                                     SAddPreMsgMult");
 #endif
-         RETVALUE(ret);
+         return (ret);
       }
       *cCnt = cnt;
 
-      RETVALUE(ROK);
+      return ROK;
    }
 
    /* add data at the end of the dst buffer */
@@ -3590,17 +3540,17 @@ MsgLen *cCnt;               /* copied count */
    {
       if ((ret = SAddPstMsgMult(srcBuf, cnt, dstMbuf)) != ROK)
       {
-         RETVALUE(ret);
+         return (ret);
       }
       *cCnt = cnt;
 
-      RETVALUE(ROK);
+      return ROK;
    }
 
    /* segment the message into dstMbuf and right */
    if ((ret = SSegMsg(dstMbuf, dstIdx, &right)) != ROK)
    {
-      RETVALUE(ret);
+      return (ret);
    }
 
    /* append data at the end of dstMbuf */
@@ -3608,7 +3558,7 @@ MsgLen *cCnt;               /* copied count */
    {
       /* ss020.103 - Addition for cleanup */
       (Void) SPutMsg(right);
-      RETVALUE(ret);
+      return (ret);
    }
 
    /* cancatenate dstMbuf and right */
@@ -3616,14 +3566,14 @@ MsgLen *cCnt;               /* copied count */
    {
       /* ss020.103 - Addition for cleanup */
       (Void) SPutMsg(right);
-      RETVALUE(ret);
+      return (ret);
    }
 
    *cCnt = cnt;
 
    (Void) SPutMsg(right);
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -3643,7 +3593,7 @@ MsgLen *cCnt;               /* copied count */
 */
 
 #ifdef ANSI
-PUBLIC S16 SCpyMsgFix
+S16 SCpyMsgFix
 (
 Buffer *srcMbuf,            /* source message buffer */
 MsgLen srcIdx,              /* source index */
@@ -3652,7 +3602,7 @@ Data *dstBuf,               /* destination buffer */
 MsgLen *cCnt
 )
 #else
-PUBLIC S16 SCpyMsgFix(srcMbuf, srcIdx, cnt, dstBuf, cCnt)
+S16 SCpyMsgFix(srcMbuf, srcIdx, cnt, dstBuf, cCnt)
 Buffer *srcMbuf;            /* source message buffer */
 MsgLen srcIdx;              /* source index */
 MsgLen cnt;                 /* count */
@@ -3665,42 +3615,40 @@ MsgLen *cCnt;               /* copied count */
    SsMsgInfo *minfo;
    MsgLen numBytes;
 
-   TRC1(SCpyMsgFix)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check source message buffer */
    if (srcMbuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS110, ERRZERO, "SCpyMsgFix : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check destination message buffer */
    if (dstBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS111, ERRZERO, "SCpyMsgFix : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (cnt <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS112, ERRZERO, "SCpyMsgFix : Invalid Index");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
  
    if (srcIdx < 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS113, ERRZERO, "SCpyMsgFix : Invalid Index");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (!cCnt)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS114, ERRZERO, "SCpyMsgFix : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (srcMbuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS115, ERRZERO, "SCpyMsgFix : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -3710,7 +3658,7 @@ MsgLen *cCnt;               /* copied count */
    if ((srcIdx + cnt) > minfo->len)
    {
       *cCnt = 0;
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    }
 
    /* get the first SS_M_DATA blk */
@@ -3751,7 +3699,7 @@ MsgLen *cCnt;               /* copied count */
          break;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -3772,18 +3720,18 @@ MsgLen *cCnt;               /* copied count */
 */
 
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SCpyMsgMsgNew
+S16 SCpyMsgMsgNew
 (
 Buffer *srcBuf,
 Region dstRegion,
 Pool dstPool,
 Buffer **dstBuf,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SCpyMsgMsg
+S16 SCpyMsgMsg
 (
 Buffer *srcBuf,
 Region dstRegion,
@@ -3791,7 +3739,7 @@ Pool dstPool,
 Buffer **dstBuf
 )
 #else
-PUBLIC S16 SCpyMsgMsg(srcBuf, dstRegion, dstPool, dstBuf)
+S16 SCpyMsgMsg(srcBuf, dstRegion, dstPool, dstBuf)
 Buffer *srcBuf;
 Region dstRegion;
 Pool dstPool;
@@ -3813,33 +3761,31 @@ Buffer **dstBuf;
 #endif
 #endif
  
-   TRC1(SCpyMsgMsg)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!srcBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS116, ERRZERO, "SCpyMsgMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (srcBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS117, ERRZERO, "SCpyMsgMsg : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* ss021.103 - Addition to validate region and pool */
    if (dstRegion >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS118, ERRZERO, 
                  "SCpyMsgMsg : Invalid region id");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
  
    if (dstPool >= SS_MAX_POOLS_PER_REG)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS119, ERRZERO, 
                  "SCpyMsgMsg : Invalid pool id");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 /* ss037.103 Removed the semaphore operation for performance enhancement */
 
@@ -3855,7 +3801,7 @@ Buffer **dstBuf;
                   "Could not lock region table");
 #endif
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -3869,12 +3815,12 @@ Buffer **dstBuf;
 #if (ERRCLASS & ERRCLS_DEBUG)
          SSLOGERROR(ERRCLS_DEBUG, ESS121, ERRZERO,
                   "Could not release semaphore");
-         RETVALUE(RFAILED);
+         return RFAILED;
 #endif
       }
 #endif
       SSLOGERROR(ERRCLS_INT_PAR, ESS122, dstRegion, "Region not registered");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 /* ss037.103 Removed the semaphore operation for performance enhancement */
@@ -3885,7 +3831,7 @@ Buffer **dstBuf;
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS123, ERRZERO,
                   "Could not release semaphore");
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif
    }
 #endif
@@ -3901,7 +3847,7 @@ Buffer **dstBuf;
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS124, ERRZERO, "SCpyMsgMsg : SGetMsg failed");
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* get the SsMsgInfo from srcBuf */
    minfo1 = (SsMsgInfo*) srcBuf->b_rptr;
@@ -3935,7 +3881,7 @@ Buffer **dstBuf;
             }
             printf("Failed to get the buffer of size %s %d\n", __FILE__, __LINE__);
             (Void) SPutMsg(*dstBuf);
-            RETVALUE(ROUTRES);
+            return (ROUTRES);
          }
 
          if (!prevblk)
@@ -3953,7 +3899,7 @@ Buffer **dstBuf;
       minfo2->endptr = curblk;
       (*dstBuf)->b_cont = newblk;
 
-      RETVALUE(ROK);
+      return ROK;
 }
 
 
@@ -3975,18 +3921,18 @@ Buffer **dstBuf;
 *
 */
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SAddMsgRefNew
+S16 SAddMsgRefNew
 (
 Buffer *srcBuf,
 Region dstRegion,
 Pool dstPool,
 Buffer **dstBuf,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SAddMsgRef
+S16 SAddMsgRef
 (
 Buffer *srcBuf,
 Region dstRegion,
@@ -3994,7 +3940,7 @@ Pool dstPool,
 Buffer **dstBuf
 )
 #else
-PUBLIC S16 SAddMsgRef(srcBuf, dstRegion, dstPool, dstBuf)
+S16 SAddMsgRef(srcBuf, dstRegion, dstPool, dstBuf)
 Buffer *srcBuf;
 Region dstRegion;
 Pool dstPool;
@@ -4012,19 +3958,18 @@ Buffer **dstBuf;
    Data *cptr;
    MsgLen numBytes;
 
-   TRC1(SAddMsgRef)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!srcBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS126, ERRZERO, "SAddMsgRef : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (srcBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS127, ERRZERO, "SAddMsgRef : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 #ifdef XEON_SPECIFIC_CHANGES
@@ -4038,7 +3983,7 @@ Buffer **dstBuf;
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS128, ERRZERO, "SAddMsgRef : SGetMsg failed");
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* get the SsMsgInfo from srcBuf */
    minfo1 = (SsMsgInfo*) srcBuf->b_rptr;
@@ -4073,7 +4018,7 @@ Buffer **dstBuf;
                newblk = curblk;
             }
             (Void) SPutMsg(*dstBuf);
-            RETVALUE(ROUTRES);
+            return (ROUTRES);
          }
 
          if (!prevblk)
@@ -4091,7 +4036,7 @@ Buffer **dstBuf;
       minfo2->endptr = curblk;
       (*dstBuf)->b_cont = newblk;
 
-      RETVALUE(ROK);
+      return ROK;
    }
 
    /* allocate a data buffer */
@@ -4101,7 +4046,7 @@ Buffer **dstBuf;
       (Void) SPutMsg(*dstBuf);
       SSLOGERROR(ERRCLS_DEBUG, ESS129, ERRZERO, "SAddMsgRef : ssGetDBufOfSize\
                  failed");
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
    dBuf->b_datap->db_type = SS_M_DATA;
 
@@ -4118,7 +4063,7 @@ Buffer **dstBuf;
    minfo2->endptr = dBuf;
    (*dstBuf)->b_cont = dBuf;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 /* ss012.13: Addition */
 #ifdef SS_M_PROTO_REGION 
@@ -4145,7 +4090,7 @@ PRIVATE Buffer *DupMsgNew
 Region region,              /* region id */
 Buffer *mp,                  /* message block */
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
@@ -4165,21 +4110,19 @@ Buffer *mp;                 /* message block */
    S16 r;                       /* return value */
    Size m;                      /* temporary */
 
-   TRC1(DupMsg);
-
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (mp == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS130, ERRZERO, "Null pointer");
-      RETVALUE(NULLP);
+      return (NULLP);
    }
 
   if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS131, ERRZERO, "DupMsg : Invalid region\
                                                    id");
-      RETVALUE(NULLP);
+      return (NULLP);
    }
 #endif
 
@@ -4193,7 +4136,7 @@ Buffer *mp;                 /* message block */
 #endif /* SS_MULTICORE_SUPPORT */
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT 
-   r = SAlloc(region, &m, 0, (Data **)&bp, __LINE__, (U8*) __FILE__, ENTNC);
+   r = SAlloc(region, &m, 0, (Data **)&bp, __LINE__, (uint8_t*) __FILE__, ENTNC);
 #else
    r = SAlloc(region, &m, 0, (Data **)&bp);
 #endif /* SS_HISTOGRAM_SUPPORT */
@@ -4203,16 +4146,16 @@ Buffer *mp;                 /* message block */
       SSLOGERROR(ERRCLS_ADD_RES, ESS132, (ErrVal) r, "SAlloc() failed");
 #endif
 
-     RETVALUE(NULLP);
+     return (NULLP);
    }
 /* generic set-up-message function */
 #if 1
 #ifndef SS_DBUF_REFLOCK_DISABLE
-   SS_STRM_INITB(bp, (SsDblk *)(((U8 *)bp) + sizeof(SsMblk)), NULLP, 0, NULLP);
+   SS_STRM_INITB(bp, (SsDblk *)(((uint8_t *)bp) + sizeof(SsMblk)), NULLP, 0, NULLP);
 #endif
 #else
    data = (Data *) (bp) + MDBSIZE;
-   SS_STRM_INITB(bp,(SsDblk *)(((U8 *)bp) + sizeof(SsMblk)), data, numBytes, NULLP);
+   SS_STRM_INITB(bp,(SsDblk *)(((uint8_t *)bp) + sizeof(SsMblk)), data, numBytes, NULLP);
 #endif /* SS_MULTICORE_SUPPORT */
 
 
@@ -4228,7 +4171,7 @@ Buffer *mp;                 /* message block */
    {
       SSLOGERROR(ERRCLS_DEBUG, ESS335, ERRZERO,
                      "Could not lock the mBuf Ref Lock");
-      RETVALUE(NULLP);
+      return (NULLP);
    }
 #endif
    /* increment the reference count of the dblock */
@@ -4240,12 +4183,12 @@ Buffer *mp;                 /* message block */
    {
       SSLOGERROR(ERRCLS_DEBUG, ESS335, ERRZERO,
                      "Could not lock the mBuf Ref Lock");
-      RETVALUE(NULLP);
+      return (NULLP);
    }
 #endif
 
 
-   RETVALUE(bp);
+   return (bp);
 } /* DupMsg */
 #endif /* SS_M_PROTO_REGION */
 
@@ -4272,24 +4215,24 @@ Buffer *mp;                 /* message block */
 */
 
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SGetDBufNew
+S16 SGetDBufNew
 (
 Region region,              /* region id */
 Pool pool,                  /* pool id */
 Buffer **bufPtr,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SGetDBuf
+S16 SGetDBuf
 (
 Region region,              /* region id */
 Pool pool,                  /* pool id */
 Buffer **bufPtr
 )
 #else
-PUBLIC S16 SGetDBuf(region, pool, bufPtr)
+S16 SGetDBuf(region, pool, bufPtr)
 Region region;              /* region id */
 Pool pool;                  /* pool id */
 Buffer **bufPtr;            /* pointer to buffer */
@@ -4316,26 +4259,24 @@ Buffer **bufPtr;            /* pointer to buffer */
 #endif
 #endif
    
-   TRC1(SGetDBuf)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check buffer pointer */
    if (!bufPtr)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS133, ERRZERO, "SGetDBuf : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS134, ERRZERO, "SGetDBuf : Invalid region\
                                                    id");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
  
    if (pool >= SS_MAX_POOLS_PER_REG)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS135, ERRZERO, "SGetDBuf : Invalid pool id");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 /* ss037.103 Removed the semaphore operation for performance enhancement */
 
@@ -4351,7 +4292,7 @@ Buffer **bufPtr;            /* pointer to buffer */
                   "Could not lock region table");
 #endif
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #endif
@@ -4368,12 +4309,12 @@ Buffer **bufPtr;            /* pointer to buffer */
 #if (ERRCLASS & ERRCLS_DEBUG)
          SSLOGERROR(ERRCLS_DEBUG, ESS137, ERRZERO,
                   "Could not release semaphore");
-         RETVALUE(RFAILED);
+         return RFAILED;
 #endif
       }
 #endif
       SSLOGERROR(ERRCLS_INT_PAR, ESS138, region, "Region not registered");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 /* ss037.103 Removed the semaphore operation for performance enhancement */
@@ -4384,7 +4325,7 @@ Buffer **bufPtr;            /* pointer to buffer */
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS139, ERRZERO,
                   "Could not release semaphore");
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif
    }
 #endif
@@ -4412,12 +4353,12 @@ Buffer **bufPtr;            /* pointer to buffer */
    /* ss006.301 : optimized this function */
 /* ss001.301: additions */
 #ifdef SS_HISTOGRAM_SUPPORT 
-    if (SAlloc(region, &mdsize, 0, (Data **) bufPtr, __LINE__, (U8*) __FILE__, ENTNC) != ROK)
+    if (SAlloc(region, &mdsize, 0, (Data **) bufPtr, __LINE__, (uint8_t*) __FILE__, ENTNC) != ROK)
 #else
     if (SAlloc(region, &mdsize, 0, (Data **) bufPtr) != ROK)
 #endif /* SS_HISTOGRAM_SUPPORT */
     {
-       RETVALUE(ROUTRES);
+       return (ROUTRES);
     }
     data = (Data *) (*bufPtr) + MDBSIZE;
     size = mdsize - MDBSIZE;
@@ -4432,7 +4373,7 @@ Buffer **bufPtr;            /* pointer to buffer */
    }
 #endif
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -4457,24 +4398,24 @@ Buffer **bufPtr;            /* pointer to buffer */
 */
 
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SPutDBufNew
+S16 SPutDBufNew
 (
 Region region,
 Pool pool,
 Buffer *buf,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SPutDBuf
+S16 SPutDBuf
 (
 Region region,
 Pool pool,
 Buffer *buf
 )
 #else
-PUBLIC S16 SPutDBuf(region, pool, buf)
+S16 SPutDBuf(region, pool, buf)
 Region region;
 Pool pool;
 Buffer *buf;
@@ -4488,7 +4429,6 @@ Buffer *buf;
    Data  *dpdkBuf;
 #endif   
  
-   TRC2(SPutDBuf);
  
    /* ss021.103 - Addition of ret initialization */
    ret = ROK;
@@ -4497,26 +4437,26 @@ Buffer *buf;
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS141, ERRZERO, "SPutDBuf:Invalid region");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
  
    if (pool >= SS_MAX_POOLS_PER_REG)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS142, ERRZERO, "SPutDBuf:Invalid pool");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
  
    if (buf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS143, ERRZERO, "SPutDBuf:Null pointer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if ( (buf->b_datap->db_type != SS_M_DATA) && (buf->b_datap->db_type != SS_M_PROTO))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS144, ERRZERO, "SPutDBuf:Incorrect\
                  buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 /* ss016.13: Addition */
@@ -4526,7 +4466,7 @@ Buffer *buf;
    if(dptr->db_type == SS_MEM_TYPE_SSI_ZBC)
    {
       ret = SPutZbcDBuf(region, buf);
-      RETVALUE(ret);
+      return (ret);
    }
 
 #ifdef TENB_DPDK_BUF
@@ -4536,7 +4476,7 @@ Buffer *buf;
       SDetachDpdkPtrFrmDBuf(buf, &dpdkBuf);
       SPutSBufDpdk(dpdkBuf);
       ret = SFree(region, (Data *) buf, MDBSIZE);
-      RETVALUE(ret);
+      return (ret);
    }
 #endif  /* TENB_DPDK_BUF */
 #endif /* SS_USE_ZBC_MEMORY */
@@ -4552,7 +4492,7 @@ Buffer *buf;
       /* if the data block is not shared, free the buffer, checks not reqd */
 #ifdef SS_HISTOGRAM_SUPPORT 
       ret = SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base
-         , __LINE__, (U8*) __FILE__, ENTNC);
+         , __LINE__, (uint8_t*) __FILE__, ENTNC);
 #else
       ret =  SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base);
 #endif /* SS_HISTOGRAM_SUPPORT */
@@ -4564,7 +4504,7 @@ Buffer *buf;
        {
           SSLOGERROR(ERRCLS_DEBUG, ESSXXX, ERRZERO,
                 "Could not lock the mBuf Ref Lock");
-          RETVALUE(RFAILED);
+          return RFAILED;
        }
 #endif
       --dptr->db_ref;
@@ -4572,13 +4512,13 @@ Buffer *buf;
       if (buf != (SsMblk *) (((Data*) dptr) - MBSIZE))
       {
         
-         SsDblk* dupdptr = (SsDblk *)((U8 *)buf + MBSIZE);
+         SsDblk* dupdptr = (SsDblk *)((uint8_t *)buf + MBSIZE);
          dupdptr->db_ref--;
          if(dupdptr->db_ref == 0)
          {
 
 #ifdef SS_HISTOGRAM_SUPPORT 
-         ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (U8*) __FILE__, ENTNC);
+         ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (uint8_t*) __FILE__, ENTNC);
 #else
          ret = SFree(region, (Data *) buf, MDBSIZE);
 
@@ -4599,11 +4539,11 @@ Buffer *buf;
       /* free buffer to region */
 #ifdef SS_HISTOGRAM_SUPPORT 
          ret = SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base
-         , __LINE__, (U8*) __FILE__, ENTNC);
+         , __LINE__, (uint8_t*) __FILE__, ENTNC);
 #else
          ret =  SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base);
 #endif /* SS_HISTOGRAM_SUPPORT */
-         RETVALUE(ret);
+         return (ret);
       }
 #ifndef SS_DBUF_REFLOCK_DISABLE
       ret = SUnlock(&(dptr->dBufLock));
@@ -4613,12 +4553,12 @@ Buffer *buf;
    /* If MultiCore Support enabled, Dblk never be shared */
 #ifdef SS_HISTOGRAM_SUPPORT 
    ret = SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base
-         , __LINE__, (U8*) __FILE__, ENTNC);
+         , __LINE__, (uint8_t*) __FILE__, ENTNC);
 #else
    ret =  SFree(region, (Data *) buf, MDBSIZE + dptr->db_lim - dptr->db_base);
 #endif /* SS_HISTOGRAM_SUPPORT */
 #endif /* SS_MULTICORE_SUPPORT */
-   RETVALUE(ret);
+   return (ret);
 }
 
 
@@ -4653,14 +4593,14 @@ Buffer *buf;
 
 
 #ifdef ANSI
-PUBLIC S16 SCatMsg
+S16 SCatMsg
 (
 Buffer *mBuf1,              /* message 1 */
 Buffer *mBuf2,              /* message 2 */
 Order order
 )
 #else
-PUBLIC S16 SCatMsg(mBuf1, mBuf2, order)
+S16 SCatMsg(mBuf1, mBuf2, order)
 Buffer *mBuf1;              /* message 1 */
 Buffer *mBuf2;              /* message 2 */
 Order order;                /* order */
@@ -4671,45 +4611,43 @@ Order order;                /* order */
    Buffer *tmp;
    Buffer *newb;
 
-   TRC1(SCatMsg)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer 1 */
    if (mBuf1 == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS148, ERRZERO, "SCatMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check message buffer 2 */
    if (mBuf2 == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS149, ERRZERO, "SCatMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* ss021.103 - Addition to test if same buffer */
    /* check message buffer 1 and 2 not same buffer */
    if (mBuf1 == mBuf2)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS150, ERRZERO, "SCatMsg : mBuf1 == mBuf2");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if ((order != M1M2) && (order != M2M1))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS151, ERRZERO, "SCatMsg : Invalid Order");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if ((mBuf1->b_datap->db_type != SS_M_PROTO) ||
        (mBuf2->b_datap->db_type != SS_M_PROTO))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS152, ERRZERO, 
                                          "SCatMsg : Incorrect buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
    /* no data to append or prepend */
    if (!mBuf2->b_cont)
-      RETVALUE(ROK);
+      return ROK;
 
    minfo1 = (SsMsgInfo*) mBuf1->b_rptr;
    minfo2 = (SsMsgInfo*) mBuf2->b_rptr;
@@ -4723,7 +4661,7 @@ Order order;                /* order */
 #endif
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS153, ERRZERO, "SCpyFixMsg : messages too big");
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
 #endif
    
@@ -4732,7 +4670,7 @@ Order order;                /* order */
       /* duplicate mBuf2 from the region/pool of mBuf1, initialise mBuf2 */
 /*ss015.13: addition */
       if (SCpyMsgMsg(mBuf2, minfo1->region, minfo1->pool, &newb) != ROK)
-         RETVALUE(RFAILED);
+         return RFAILED;
 
       minfo2 = (SsMsgInfo*) newb->b_rptr;
    }
@@ -4767,7 +4705,7 @@ Order order;                /* order */
 #endif
             if (newb && (newb != mBuf2))
                (Void) SPutMsg(newb);
-            RETVALUE(RFAILED);
+            return RFAILED;
          }
       }
    }
@@ -4785,7 +4723,7 @@ Order order;                /* order */
       (Void) SInitMsg(mBuf2);
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -4814,14 +4752,14 @@ Order order;                /* order */
 
 
 #ifdef ANSI
-PUBLIC S16 SRepMsg
+S16 SRepMsg
 (
 Data data,                  /* data */
 Buffer *mBuf,               /* message buffer */
 MsgLen idx
 )
 #else
-PUBLIC S16 SRepMsg(data, mBuf, idx)
+S16 SRepMsg(data, mBuf, idx)
 Data data;                  /* data */
 Buffer *mBuf;               /* message buffer */
 MsgLen idx;                 /* index */
@@ -4833,29 +4771,28 @@ MsgLen idx;                 /* index */
    Buffer *prev;
    MsgLen numBytes;
 
-   TRC1(SRepMsg)
 
 #ifdef T2K_MEM_LEAK_DBG
    char* file = __FILE__;
-   U32 line = __LINE__;
+   uint32_t line = __LINE__;
 #endif
 #if ( ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer */
    if (mBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS155, ERRZERO, "SRepMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (idx < 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS156, ERRZERO, "SRepMsg : Invalid index");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS157, ERRZERO, "SRepMsg : Incorrect buffer\
                                                    type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -4864,7 +4801,7 @@ MsgLen idx;                 /* index */
    /* if index > length of the buffer */
    if (minfo->len <= idx)
    {
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    }
 
    tmp = mBuf->b_cont; /* get the first SS_M_DATA blk */
@@ -4881,7 +4818,7 @@ MsgLen idx;                 /* index */
       {
          SSLOGERROR(ERRCLS_DEBUG, ESS158, ERRZERO, "SRepMsg : ssGetDBufOfSize\
                     failed");
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
       while (numBytes--)
          *newb->b_wptr++ = *tmp->b_rptr++;
@@ -4897,7 +4834,7 @@ MsgLen idx;                 /* index */
    }
    *(tmp->b_rptr + idx) = data;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -4916,14 +4853,14 @@ MsgLen idx;                 /* index */
 
 
 #ifdef ANSI
-PUBLIC S16 SUpdMsg
+S16 SUpdMsg
 (
 Buffer *mBuf,                   /* message buffer */
 Buffer *dBuf,                   /* data buffer */
 MsgLen dLen
 )
 #else
-PUBLIC S16 SUpdMsg(mBuf, dBuf, dLen)
+S16 SUpdMsg(mBuf, dBuf, dLen)
 Buffer *mBuf;                   /* message buffer */
 Buffer *dBuf;                   /* data buffer */
 MsgLen dLen;                    /* data length */
@@ -4931,30 +4868,28 @@ MsgLen dLen;                    /* data length */
 {
    SsMsgInfo *minfo;
 
-   TRC1(SUpdMsg)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS159, ERRZERO, "SUpdMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (!dBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS160, ERRZERO, "SUpdMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (dLen < 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS161, ERRZERO, "SUpdMsg : Invalid length");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if ((mBuf->b_datap->db_type != SS_M_PROTO) ||
        (dBuf->b_datap->db_type != SS_M_DATA))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS162, ERRZERO, "SUpdMsg : Incorrect buffer\
                                                    type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -4967,7 +4902,7 @@ MsgLen dLen;                    /* data length */
    if ((dBuf->b_rptr + dLen) > dBuf->b_datap->db_lim)
    {
       SSLOGERROR(ERRCLS_DEBUG, ESS163, ERRZERO, "SUpdMsg:Offset out of bounds");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* offset write ptr from read ptr by dLen */
@@ -4984,7 +4919,7 @@ MsgLen dLen;                    /* data length */
 
    minfo->len += dLen;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -5009,40 +4944,38 @@ MsgLen dLen;                    /* data length */
 
  
 #ifdef ANSI
-PUBLIC S16 SAddDBufPst
+S16 SAddDBufPst
 (
 Buffer *mBuf,                   /* message buffer */
 Buffer *dBuf
 )
 #else
-PUBLIC S16 SAddDBufPst(mBuf, dBuf)
+S16 SAddDBufPst(mBuf, dBuf)
 Buffer *mBuf;                   /* message buffer */
 Buffer *dBuf;                   /* data buffer */
 #endif
 {
    SsMsgInfo *minfo;
 
-   TRC1(SAddDBufPst)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check buffer queue */
    if (!mBuf || !dBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS164, ERRZERO, "SAddDBufPst : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if ((mBuf->b_datap->db_type != SS_M_PROTO) ||
        (dBuf->b_datap->db_type != SS_M_DATA))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS165, ERRZERO, "SAddDBufPst : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
    /* no data, return */
    if (dBuf->b_wptr == dBuf->b_rptr)
-      RETVALUE(ROK);
+      return ROK;
 
    minfo = (SsMsgInfo*) (mBuf)->b_rptr;
  
@@ -5057,7 +4990,7 @@ Buffer *dBuf;                   /* data buffer */
 
    minfo->len += dBuf->b_wptr - dBuf->b_rptr;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -5082,13 +5015,13 @@ Buffer *dBuf;                   /* data buffer */
 
  
 #ifdef ANSI
-PUBLIC S16 SAddDBufPre
+S16 SAddDBufPre
 (
 Buffer *mBuf,                    /* message buffer */
 Buffer *dBuf
 )
 #else
-PUBLIC S16 SAddDBufPre(mBuf, dBuf)
+S16 SAddDBufPre(mBuf, dBuf)
 Buffer *mBuf;                    /* message buffer */
 Buffer *dBuf;                    /* data buffer */
 #endif
@@ -5096,27 +5029,25 @@ Buffer *dBuf;                    /* data buffer */
    SsMsgInfo *minfo;
    Buffer *tmp;
 
-   TRC1(SAddDBufPre)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check buffer queue */
    if (!mBuf || !dBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS166, ERRZERO, "SAddDBufPre : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if ((mBuf->b_datap->db_type != SS_M_PROTO) ||
        (dBuf->b_datap->db_type != SS_M_DATA))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS167, ERRZERO, "SAddDBufPre : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
  
    /* no data, return */
    if (dBuf->b_wptr == dBuf->b_rptr)
-      RETVALUE(ROK);
+      return ROK;
  
    minfo = (SsMsgInfo*) (mBuf)->b_rptr;
 
@@ -5131,7 +5062,7 @@ Buffer *dBuf;                    /* data buffer */
    if (!tmp)
       minfo->endptr = dBuf;
 
-   RETVALUE(ROK);
+   return ROK;
 }
  
 /*
@@ -5158,39 +5089,37 @@ Buffer *dBuf;                    /* data buffer */
 
  
 #ifdef ANSI
-PUBLIC S16 SRemDBufPre
+S16 SRemDBufPre
 (
 Buffer *mBuf,                   /* message buffer */
 Buffer **dBufPtr
 )
 #else
-PUBLIC S16 SRemDBufPre(mBuf, dBufPtr)
+S16 SRemDBufPre(mBuf, dBufPtr)
 Buffer *mBuf;                   /* message buffer */
 Buffer **dBufPtr;               /* pointer to data buffer */
 #endif
 {
    SsMsgInfo *minfo;
 
-   TRC1(SRemDBufPre)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check buffer pointer */
    if (dBufPtr == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS168, ERRZERO, "SRemDBufPre : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check queue */
    if (mBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS169, ERRZERO, "SRemDBufPre : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS170, ERRZERO, "SRemDBufPre : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -5208,7 +5137,7 @@ Buffer **dBufPtr;               /* pointer to data buffer */
    if (!(minfo->len -= (*dBufPtr)->b_wptr - (*dBufPtr)->b_rptr))
       minfo->endptr = NULLP;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -5235,13 +5164,13 @@ Buffer **dBufPtr;               /* pointer to data buffer */
 
  
 #ifdef ANSI
-PUBLIC S16 SRemDBufPst
+S16 SRemDBufPst
 (
 Buffer *mBuf,                   /* message buffer */
 Buffer **dBufPtr
 )
 #else
-PUBLIC S16 SRemDBufPst(mBuf, dBufPtr)
+S16 SRemDBufPst(mBuf, dBufPtr)
 Buffer *mBuf;                   /* message buffer */
 Buffer **dBufPtr;               /* pointer to data buffer */
 #endif
@@ -5249,26 +5178,24 @@ Buffer **dBufPtr;               /* pointer to data buffer */
    SsMsgInfo *minfo;
    Buffer *tmp;
 
-   TRC1(SRemDBufPst)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check buffer pointer */
    if (!dBufPtr)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS171, ERRZERO, "SRemDBufPst : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check message */
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS172, ERRZERO, "SRemDBufPst : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS173, ERRZERO, "SRemDBufPst : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
  
@@ -5290,7 +5217,7 @@ Buffer **dBufPtr;               /* pointer to data buffer */
    else
       minfo->endptr = tmp;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -5309,30 +5236,28 @@ Buffer **dBufPtr;               /* pointer to data buffer */
 
  
 #ifdef ANSI
-PUBLIC S16 SInitNxtDBuf
+S16 SInitNxtDBuf
 (
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SInitNxtDBuf(mBuf)
+S16 SInitNxtDBuf(mBuf)
 Buffer *mBuf;                   /* message buffer */
 #endif
 {
    SsMsgInfo *minfo;
 
-   TRC1(SInitNxtDBuf)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS174, ERRZERO, "SInitNxtDBuf : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS175, ERRZERO, "SInitNxtDBuf : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -5341,7 +5266,7 @@ Buffer *mBuf;                   /* message buffer */
    /* set the next ptr of mBuf to point to the first SS_M_DATA blk */
    minfo->next = mBuf->b_cont;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -5360,37 +5285,35 @@ Buffer *mBuf;                   /* message buffer */
 
  
 #ifdef ANSI
-PUBLIC S16 SGetNxtDBuf
+S16 SGetNxtDBuf
 (
 Buffer *mBuf,                   /* message buffer */
 Buffer **dBuf
 )
 #else
-PUBLIC S16 SGetNxtDBuf(mBuf, dBuf)
+S16 SGetNxtDBuf(mBuf, dBuf)
 Buffer *mBuf;                   /* message buffer */
 Buffer **dBuf;                  /* data buffer return */
 #endif
 {
    SsMsgInfo *minfo;
 
-   TRC1(SGetNxtDBuf)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS176, ERRZERO, "SGetNxtDBuf : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (!dBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS177, ERRZERO, "SGetNxtDBuf : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS178, ERRZERO, "SGetNxtDBuf : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -5398,12 +5321,12 @@ Buffer **dBuf;                  /* data buffer return */
 
    /* if next ptr of mBuf is NULLP, return */
    if ((*dBuf = minfo->next) == NULLP)
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
 
    /* update next */
    minfo->next = (*dBuf)->b_cont;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -5421,30 +5344,28 @@ Buffer **dBuf;                  /* data buffer return */
 */
 
 #ifdef ANSI
-PUBLIC S16 SChkNxtDBuf
+S16 SChkNxtDBuf
 (
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SChkNxtDBuf(mBuf)
+S16 SChkNxtDBuf(mBuf)
 Buffer *mBuf;                   /* message buffer */
 #endif
 {
    SsMsgInfo *minfo;
 
-   TRC1(SChkNxtDBuf)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS179, ERRZERO, "SChkNxtDBuf : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS180, ERRZERO, "SChkNxtDBuf : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS */
 
@@ -5452,9 +5373,9 @@ Buffer *mBuf;                   /* message buffer */
 
    /* if next is valid, return ROK */
    if (minfo->next)
-      RETVALUE(ROK);
+      return ROK;
    else
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
 }
 
 /*
@@ -5476,7 +5397,7 @@ Buffer *mBuf;                   /* message buffer */
 
  
 #ifdef ANSI
-PUBLIC S16 SGetDataRx
+S16 SGetDataRx
 (
 Buffer *dBuf,                   /* data buffer */
 MsgLen pad,                     /* pad */
@@ -5484,36 +5405,35 @@ Data **retDatPtr,               /* return data pointer */
 MsgLen *retDatLen
 )
 #else
-PUBLIC S16 SGetDataRx(dBuf, pad, retDatPtr, retDatLen)
+S16 SGetDataRx(dBuf, pad, retDatPtr, retDatLen)
 Buffer *dBuf;                   /* data buffer */
 MsgLen pad;                     /* pad */
 Data **retDatPtr;               /* return data pointer */
 MsgLen *retDatLen;              /* return data length */
 #endif
 {
-   TRC1(SGetDataRx)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!dBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS181, ERRZERO, "SGetDataRx : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (!retDatLen || (pad < 0))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS182, ERRZERO, "SGetDataRx : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (!retDatPtr)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS183, ERRZERO, "SGetDataRx : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (dBuf->b_datap->db_type != SS_M_DATA)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS184, ERRZERO, "SGetDataRx : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS */
 
@@ -5523,7 +5443,7 @@ MsgLen *retDatLen;              /* return data length */
       SSLOGERROR(ERRCLS_DEBUG, ESS185, ERRZERO, "SGetDataRx : Reference\
                                                  count > 1");
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* return the write ptr loc(with padding) if there is data to write to */
@@ -5535,10 +5455,10 @@ MsgLen *retDatLen;              /* return data length */
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS186, ERRZERO, "SGetDataRx:No data available");
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -5560,45 +5480,44 @@ MsgLen *retDatLen;              /* return data length */
 
  
 #ifdef ANSI
-PUBLIC S16 SGetDataTx
+S16 SGetDataTx
 (
 Buffer *dBuf,                   /* data buffer */
 Data **retDatPtr,               /* return data pointer */
 MsgLen *retDatLen               /* return data length */
 )
 #else
-PUBLIC S16 SGetDataTx(dBuf, retDatPtr, retDatLen)
+S16 SGetDataTx(dBuf, retDatPtr, retDatLen)
 Buffer *dBuf;                   /* data buffer */
 Data **retDatPtr;               /* return data pointer */
 MsgLen *retDatLen;              /* return data length */
 #endif
 {
-   TRC1(SGetDataTx)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* ss021.103 - Modification to check parameters */
    if (!retDatPtr)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS187, ERRZERO, "SGetDataTx : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (!dBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS188, ERRZERO, "SGetDataTx : Null Buffer");
       *retDatPtr = (Data *)NULLP;
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (!retDatLen)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS189, ERRZERO, "SGetDataTx : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (dBuf->b_datap->db_type != SS_M_DATA)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS190, ERRZERO, "SGetDataTx : Incorrect\
                                                    buffer type");
       *retDatPtr = (Data *)NULLP;
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS */
 
@@ -5611,10 +5530,10 @@ MsgLen *retDatLen;              /* return data length */
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS191, ERRZERO, "SGetDataTx : Buffer empty");
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 #ifndef SS_ENABLE_MACROS
@@ -5634,14 +5553,14 @@ MsgLen *retDatLen;              /* return data length */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetBufRegionPool
+S16 SGetBufRegionPool
 (
 Buffer *mBuf,                   /* message buffer */
 Region *region,                 /* region */
 Pool   *pool                    /* pool */
 )
 #else
-PUBLIC S16 SGetBufRegionPool(mBuf, region, pool)
+S16 SGetBufRegionPool(mBuf, region, pool)
 Buffer *mBuf;                   /* message buffer */
 Region *region;                 /* region */
 Pool   *pool;                   /* pool */
@@ -5649,7 +5568,6 @@ Pool   *pool;                   /* pool */
 {
    SsMsgInfo *mInfo;            /* message info pointer */
 
-   TRC1(SGetBufRegionPool)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
 
@@ -5657,19 +5575,19 @@ Pool   *pool;                   /* pool */
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS192, ERRZERO, 
                  "SGetBufRegionPool : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if ((region == NULLP) && (pool == NULLP))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS193, ERRZERO, 
                  "SGetBufRegionPool : Null region and pool pointers");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS194, ERRZERO, 
                  "SUpdMsg : Incorrect buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* (ERRCLASS & ERRCLS_INT_PAR */
 
@@ -5680,7 +5598,7 @@ Pool   *pool;                   /* pool */
       SSLOGERROR(ERRCLS_DEBUG, ESS195, ERRZERO, 
                  "SGetBufRegionPool : mBuf's control data is null");
 #endif
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if (region != NULLP)
@@ -5688,7 +5606,7 @@ Pool   *pool;                   /* pool */
    if (pool != NULLP)
       *pool   = mInfo->pool;
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of SGetBufRegionPool */
 
 #endif /* SS_ENABLE_MACROS */
@@ -5712,12 +5630,12 @@ Pool   *pool;                   /* pool */
 
  
 #ifdef ANSI
-PUBLIC S16 SCompressMsg
+S16 SCompressMsg
 (
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SCompressMsg(mBuf)
+S16 SCompressMsg(mBuf)
 Buffer *mBuf;                    /* message buffer */
 #endif
 {
@@ -5730,21 +5648,20 @@ Buffer *mBuf;                    /* message buffer */
 
 #ifdef T2K_MEM_LEAK_DBG
    char* file = __FILE__;
-   U32 line = __LINE__;
+   uint32_t line = __LINE__;
 #endif
-   TRC1(SCompressMsg)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!mBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS196, ERRZERO, "SCompressMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS197, ERRZERO, "SCompressMsg : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -5752,7 +5669,7 @@ Buffer *mBuf;                    /* message buffer */
 
    if ((tmp = mBuf->b_cont) == minfo->endptr)
    {
-      RETVALUE(ROK);
+      return ROK;
    }
 
    /* allocate a data buffer of size bytes*/
@@ -5760,7 +5677,7 @@ Buffer *mBuf;                    /* message buffer */
    {
       SSLOGERROR(ERRCLS_DEBUG, ESS198, ERRZERO, "SAddMsgRef : ssGetDBufOfSize\
                  failed");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    dBuf->b_datap->db_type = SS_M_DATA;
 
@@ -5787,7 +5704,7 @@ Buffer *mBuf;                    /* message buffer */
    mBuf->b_cont = dBuf;
    minfo->endptr = dBuf;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -5810,14 +5727,14 @@ Buffer *mBuf;                    /* message buffer */
 */
   
 #ifdef ANSI
-PUBLIC S16 SPrntMsg
+S16 SPrntMsg
 (
 Buffer *mBuf,               /* message buffer */
 S16 src,                    /* source id */
 S16 dst                     /* destination id */
 )
 #else
-PUBLIC S16 SPrntMsg(mBuf, src, dst)
+S16 SPrntMsg(mBuf, src, dst)
 Buffer *mBuf;               /* message buffer */
 S16 src;                    /* source id */
 S16 dst;                    /* destination id */
@@ -5832,8 +5749,8 @@ S16 dst;                    /* destination id */
        MsgLen i;                /* counter */
        S16 j;                   /* counter */
    S16 k;                   /* counter */
-   U8 data;                 /* data */
-   U8 tdata[16] = {0};            /* temporary data */
+   uint8_t data;                 /* data */
+   uint8_t tdata[16] = {0};            /* temporary data */
    S8 prntBuf[256];         /* print buffer */
    Buffer *tmp;             /* buffer ptr */
    Data *cptr;
@@ -5841,14 +5758,13 @@ S16 dst;                    /* destination id */
    Data reg;
 
 
-   TRC1(SPrntMsg)
 
    if (mBuf == NULLP)
    {
       sprintf(prntBuf,"\nmsg: empty\n");
       SPrint(prntBuf);
       SPrint( (S8*)"\n\n");
-      RETVALUE(ROK);
+      return ROK;
    }
 
    for (qlen = 0, tmp = mBuf->b_cont; tmp; qlen++)
@@ -5857,7 +5773,7 @@ S16 dst;                    /* destination id */
    reg = ((SsMsgInfo*)(mBuf->b_rptr))->region;
    /*ss013.301: Fixed Warnings for 32/64 bit compilation*/
    sprintf(prntBuf,"\nmsg: qlen: %04d mlen: %04d   %02d-->%02d region: %02d\n",
-           (U16)qlen,(U16)mlen,src,dst,reg);
+           (uint16_t)qlen,(uint16_t)mlen,src,dst,reg);
    SPrint( prntBuf);
 #ifdef XEON_SPECIFIC_CHANGES
    printf("%s\n", prntBuf);
@@ -5872,7 +5788,7 @@ S16 dst;                    /* destination id */
       sprintf(prntBuf," empty\n");
       SPrint(prntBuf);
       SPrint( (S8*)"\n\n");
-      RETVALUE(ROK);
+      return ROK;
    }
    tmp = mBuf->b_cont;
    cptr = tmp->b_rptr;
@@ -5887,7 +5803,7 @@ S16 dst;                    /* destination id */
          { 
             /* print hex */
             tdata[j]=data;
-            sprintf( prntBuf,"%02x ",(U16) data);
+            sprintf( prntBuf,"%02x ",(uint16_t) data);
             SPrint( prntBuf);
 #ifdef XEON_SPECIFIC_CHANGES
    printf("%s\n", prntBuf);
@@ -5940,7 +5856,7 @@ S16 dst;                    /* destination id */
    printf("%s\n", prntBuf);
 #endif   
    }
-   RETVALUE(ROK);
+   return ROK;
 
 } /* end of SPrntMsg */
 
@@ -5968,13 +5884,13 @@ S16 dst;                    /* destination id */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetPstMsgMult
+S16 SGetPstMsgMult
 (
 MsgLen cnt,                 /* count */
 Buffer *mBuf                /* message buffer */
 )
 #else
-PUBLIC S16 SGetPstMsgMult(cnt, mBuf)
+S16 SGetPstMsgMult(cnt, mBuf)
 MsgLen cnt;                 /* count */
 Buffer *mBuf;               /* message buffer */
 #endif
@@ -5985,26 +5901,21 @@ Buffer *mBuf;               /* message buffer */
    MsgLen numBytes;
    MsgLen avail;
 
-#if 0
-   char* file = __FILE__;
-   U32 line = __LINE__;
-#endif
-   TRC1(SGetPstMsgMult)
 
 #if ( ERRCLASS & ERRCLS_INT_PAR )
    /* check message buffer */
    if (mBuf == NULLP)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check count */
    if (cnt <= 0)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
    /* get the message info */
@@ -6028,7 +5939,7 @@ Buffer *mBuf;               /* message buffer */
 
       tmp->b_wptr += numBytes;
       if (!cnt)
-         RETVALUE(ROK);
+         return ROK;
    }
    if (ssGetDBufOfSize(minfo->region, cnt, &newb) != ROK)
    {
@@ -6036,7 +5947,7 @@ Buffer *mBuf;               /* message buffer */
       if ((avail) && (tmp))
          tmp->b_wptr = tmp->b_datap->db_lim - avail;
       minfo->len -= avail;
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
 
    minfo->len += cnt;
@@ -6056,7 +5967,7 @@ Buffer *mBuf;               /* message buffer */
 
    minfo->endptr = newb;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -6077,44 +5988,43 @@ Buffer *mBuf;               /* message buffer */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SChkMsg
+S16 SChkMsg
 (
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SChkMsg(mBuf)
+S16 SChkMsg(mBuf)
 Buffer *mBuf;
 #endif
 {
    SsMsgInfo *minfo;
    Buffer *tmp;
 
-   TRC1(SChkMsg)
  
 #if ( ERRCLASS & ERRCLS_INT_PAR )
    /* check message buffer */
    if (mBuf == NULLP)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
    /* get the message info */
    minfo = (SsMsgInfo *) (mBuf->b_rptr);
 
    if (minfo->len < 2)
-      RETVALUE(RFAILED);
+      return RFAILED;
 
    /* get the first M_DATA blk*/
    tmp = mBuf->b_cont;
 
    if (((tmp->b_rptr + 2) <= tmp->b_wptr) || (SCompressMsg(mBuf) == ROK))
-      RETVALUE(ROK);
+      return ROK;
 
-   RETVALUE(RFAILED);
+   return RFAILED;
 }
 
 /*
@@ -6132,42 +6042,40 @@ Buffer *mBuf;
 *
 */
 #ifdef ANSI
-PUBLIC S16 SAlignDBufEven
+S16 SAlignDBufEven
 (
 Buffer *dBuf                      /* data buffer */
 )
 #else
-PUBLIC S16 SAlignDBufEven(dBuf)
+S16 SAlignDBufEven(dBuf)
 Buffer *dBuf;                   /* data buffer  */
 #endif
 {
    MsgLen len;
    Data *src;
 
-   TRC1(SAlignDBufEven)
-
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!dBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS199, ERRZERO, "SAlignDBufEven : Null\
                  Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (dBuf->b_datap->db_type != SS_M_DATA)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS200, ERRZERO, "SAlignDBufEven : Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
    src = dBuf->b_rptr;
 /* ss008.13: addition */
    if (!((PTR)src % (PTR)2))
-      RETVALUE(ROK);
+      return ROK;
 
    if (dBuf->b_datap->db_ref > 1)
-      RETVALUE(RFAILED);
+      return RFAILED;
 
    len = dBuf->b_wptr - dBuf->b_rptr;
 
@@ -6186,9 +6094,9 @@ Buffer *dBuf;                   /* data buffer  */
             *--dBuf->b_rptr = *src--;
       }
       else
-         RETVALUE(RFAILED);
+         return RFAILED;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /* ss004.13: addition */
@@ -6207,36 +6115,34 @@ Buffer *dBuf;                   /* data buffer  */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SAlignDBuf
+S16 SAlignDBuf
 (
 Buffer *dBuf,                      /* data buffer */
-U32    align                       /* alignemnt required */
+uint32_t    align                       /* alignemnt required */
 )
 #else
-PUBLIC S16 SAlignDBuf(dBuf, align)
+S16 SAlignDBuf(dBuf, align)
 Buffer *dBuf;                      /* data buffer  */
-U32    align;                      /* alignemnt required */
+uint32_t    align;                      /* alignemnt required */
 #endif
 {
    MsgLen len;
    Data   *src;
-   U32    upShift;                 /* no. of bytes to be shifted up */
-   U32    downShift;               /* no. of bytes to be shifted down */
-
-   TRC1(SAlignDBuf)
+   uint32_t    upShift;                 /* no. of bytes to be shifted up */
+   uint32_t    downShift;               /* no. of bytes to be shifted down */
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!dBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS201, ERRZERO, "SAlignDBuf: Null\
                  Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (dBuf->b_datap->db_type != SS_M_DATA)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS202, ERRZERO, "SAlignDBuf: Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -6246,10 +6152,10 @@ U32    align;                      /* alignemnt required */
                                      * the read and write pointers */
 
    if (!upShift)
-      RETVALUE(ROK);
+      return ROK;
 
    if (dBuf->b_datap->db_ref > 1)
-      RETVALUE(RFAILED);
+      return RFAILED;
 
    downShift = align - upShift;   /* no of bytes by which to shift down
                                    * the read and write pointers */
@@ -6275,10 +6181,10 @@ U32    align;                      /* alignemnt required */
             *--dBuf->b_rptr = *src--;
       }
       else
-         RETVALUE(RFAILED);
+         return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 \f
@@ -6300,21 +6206,19 @@ U32    align;                      /* alignemnt required */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetSMem
+S16 SGetSMem
 (
 Region region,                  /* region ID */
 Size size,                      /* size */
 Pool *pool                      /* pointer to pool ID */
 )
 #else
-PUBLIC S16 SGetSMem(region, size, pool)
+S16 SGetSMem(region, size, pool)
 Region region;                  /* region ID */
 Size size;                      /* size */
 Pool *pool;                     /* pointer to pool ID */
 #endif
 {
-   TRC1(SGetSMem);
-
 
    UNUSED(size);
 
@@ -6324,14 +6228,14 @@ Pool *pool;                     /* pointer to pool ID */
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS203, region, "Invalid region");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* validate pointer to pool ID */
    if (pool == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS204, region, "Null pointer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -6340,7 +6244,7 @@ Pool *pool;                     /* pointer to pool ID */
    *pool = 0;
 
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 \f
@@ -6361,13 +6265,13 @@ Pool *pool;                     /* pointer to pool ID */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SPutSMem
+S16 SPutSMem
 (
 Region region,                  /* region ID */
 Pool pool                       /* pool ID */
 )
 #else
-PUBLIC S16 SPutSMem(region, pool)
+S16 SPutSMem(region, pool)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 #endif
@@ -6377,22 +6281,20 @@ Pool pool;                      /* pool ID */
    S16   ret;
 #endif
 
-   TRC1(SPutSMem);
-
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* validate region ID */
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS205, region, "Invalid region");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* validate pool ID */
    if (pool >= SS_MAX_POOLS_PER_REG)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS206, region, "Invalid pool");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* ss021.103 - Addition to check if region is registered */
@@ -6406,7 +6308,7 @@ Pool pool;                      /* pool ID */
                   "Could not lock region table");
 #endif
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 
@@ -6419,12 +6321,12 @@ Pool pool;                      /* pool ID */
 #if (ERRCLASS & ERRCLS_DEBUG)
          SSLOGERROR(ERRCLS_DEBUG, ESS208, ERRZERO,
                   "Could not release semaphore");
-         RETVALUE(RFAILED);
+         return RFAILED;
 #endif
       }
 
       SSLOGERROR(ERRCLS_INT_PAR, ESS209, region, "Region not registered");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -6433,12 +6335,12 @@ Pool pool;                      /* pool ID */
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS210, ERRZERO,
                   "Could not release semaphore");
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif
    }
 #endif
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 \f
@@ -6457,14 +6359,14 @@ Pool pool;                      /* pool ID */
 *
 */
 #ifdef ANSI
-PUBLIC S16 SChkRes
+S16 SChkRes
 (
 Region region,                  /* region ID */
 Pool pool,                      /* pool ID */
 Status *status                  /* pointer to status */
 )
 #else
-PUBLIC S16 SChkRes(region, pool, status)
+S16 SChkRes(region, pool, status)
 Region region;                  /* region ID */
 Pool pool;                      /* pool ID */
 Status *status;                 /* pointer to status */
@@ -6474,29 +6376,27 @@ Status *status;                 /* pointer to status */
    SMemCtl mctl;
 
 
-   TRC1(SChkRes);
-
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* validate region ID */
    if (region >= SS_MAX_REGS)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS229, region, "Invalid region");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* validate pool ID */
    if (pool >= SS_MAX_POOLS_PER_REG)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS230, region, "Invalid pool");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* validate status pointer */
    if (status == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS231, ERRZERO, "Null pointer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 /* ss037.103 Removed the semaphore operation for performance enhancement */
@@ -6512,7 +6412,7 @@ Status *status;                 /* pointer to status */
                   "Could not lock region table");
 #endif
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 
@@ -6527,19 +6427,19 @@ Status *status;                 /* pointer to status */
 #if (ERRCLASS & ERRCLS_DEBUG)
          SSLOGERROR(ERRCLS_DEBUG, ESS233, ERRZERO,
                   "Could not release semaphore");
-         RETVALUE(RFAILED);
+         return RFAILED;
 #endif
       }
 
       SSLOGERROR(ERRCLS_INT_PAR, ESS234, region, "Region not registered");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* verify that this is a valid pool */
    if (osCp.regionTbl[region].poolTbl[pool].type != SS_POOL_DYNAMIC)
    {
       SSLOGERROR(ERRCLS_DEBUG, ESS235, ERRZERO, "Invalid pool");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 #endif
@@ -6559,12 +6459,12 @@ Status *status;                 /* pointer to status */
 #if (ERRCLASS & ERRCLS_DEBUG)
       SSLOGERROR(ERRCLS_DEBUG, ESS236, ERRZERO,
                   "Could not release semaphore");
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif
    }
 #endif
 
-   RETVALUE(ret);
+   return (ret);
 }
 
 /*
@@ -6585,13 +6485,13 @@ Status *status;                 /* pointer to status */
 
 
 #ifdef ANSI
-PUBLIC S16 SSwapMsg
+S16 SSwapMsg
 (
 Buffer *mBuf1,              /* message 1 */
 Buffer *mBuf2               /* message 2 */
 )
 #else
-PUBLIC S16 SSwapMsg(mBuf1, mBuf2)
+S16 SSwapMsg(mBuf1, mBuf2)
 Buffer *mBuf1;              /* message 1 */
 Buffer *mBuf2;              /* message 2 */
 #endif
@@ -6603,34 +6503,33 @@ Buffer *mBuf2;              /* message 2 */
    SsMsgInfo *minfo2;
 #endif
    Buffer *tmp;
-   U8 tmp2;
+   uint8_t tmp2;
    
-   TRC1(SSwapMsg)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer 1 */
    if (mBuf1 == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS237, ERRZERO, "SSwapMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check message buffer 2 */
    if (mBuf2 == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS238, ERRZERO, "SSwapMsg : Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf1->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS239, ERRZERO, "SSwapMsg: Incorrect buffer\
                                                    type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf2->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS240, ERRZERO, "SSwapMsg: Incorrect buffer\
                                                    type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    minfo1 = (SsMsgInfo*) mBuf1->b_rptr;
    minfo2 = (SsMsgInfo*) mBuf2->b_rptr;
@@ -6638,7 +6537,7 @@ Buffer *mBuf2;              /* message 2 */
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS241, ERRZERO, "SSwapMsg: differnt regions\
                                                    for messages");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -6673,7 +6572,7 @@ Buffer *mBuf2;              /* message 2 */
    SMemCpy((Void *) (mBuf1->b_datap->db_base), (Void *) (mBuf2->b_datap->db_base), (size_t)(sizeof(SsMsgInfo)));
    SMemCpy((Void *) (mBuf2->b_datap->db_base), (Void *) minfop, (size_t)(sizeof(SsMsgInfo)));
 
-   RETVALUE(ROK);
+   return ROK;
 }
 /* ss004.301 : Cavium changes */
 #ifdef SS_SEUM_CAVIUM
@@ -6697,12 +6596,12 @@ Buffer *mBuf2;              /* message 2 */
  *
  */
 #ifdef ANSI
-PUBLIC S16 SConvPtrPhy
+S16 SConvPtrPhy
 (
  Buffer  **mBuf
 )
 #else
-PUBLIC S16 SConvPtrPhy (mBuf)
+S16 SConvPtrPhy (mBuf)
   Buffer **mBuf;
 #endif
 {
@@ -6713,13 +6612,11 @@ PUBLIC S16 SConvPtrPhy (mBuf)
   SsDblk      *dblkPtr;
   SsFrtn      *frtnPtr;
 
-  TRC1(SConvPtrPhy);
-
 
   /* check mBuf for NULLP */
   if ( (mBuf == NULLP) || (*mBuf == NULLP ) )
   {
-        RETVALUE(RFAILED);
+        return RFAILED;
   }
 
   /* first block in Buffer is head */
@@ -6754,9 +6651,9 @@ PUBLIC S16 SConvPtrPhy (mBuf)
         minfoPtr->next = (Buffer*)cvmx_ptr_to_phys (minfoPtr->next);
   }
 
-  curPtr->b_rptr = (U8*)cvmx_ptr_to_phys (curPtr->b_rptr);
+  curPtr->b_rptr = (uint8_t*)cvmx_ptr_to_phys (curPtr->b_rptr);
 
-  curPtr->b_wptr = (U8*)cvmx_ptr_to_phys (curPtr->b_wptr);
+  curPtr->b_wptr = (uint8_t*)cvmx_ptr_to_phys (curPtr->b_wptr);
 
   /* Convert the pointers of Dblock to Physical addr */
   dblkPtr = (SsDblk*)curPtr->b_datap;
@@ -6779,8 +6676,8 @@ PUBLIC S16 SConvPtrPhy (mBuf)
   }
 #endif
 
-  dblkPtr->db_base = (U8*)cvmx_ptr_to_phys (dblkPtr->db_base);
-  dblkPtr->db_lim = (U8*)cvmx_ptr_to_phys (dblkPtr->db_lim);
+  dblkPtr->db_base = (uint8_t*)cvmx_ptr_to_phys (dblkPtr->db_base);
+  dblkPtr->db_lim = (uint8_t*)cvmx_ptr_to_phys (dblkPtr->db_lim);
 
   curPtr->b_datap = (SsDblk*)cvmx_ptr_to_phys (curPtr->b_datap);
 
@@ -6797,8 +6694,8 @@ PUBLIC S16 SConvPtrPhy (mBuf)
                curPtr->b_cont = (Buffer*)cvmx_ptr_to_phys (curPtr->b_cont);
         }
 
-        curPtr->b_rptr = (U8*)cvmx_ptr_to_phys (curPtr->b_rptr);
-        curPtr->b_wptr = (U8*)cvmx_ptr_to_phys (curPtr->b_wptr);
+        curPtr->b_rptr = (uint8_t*)cvmx_ptr_to_phys (curPtr->b_rptr);
+        curPtr->b_wptr = (uint8_t*)cvmx_ptr_to_phys (curPtr->b_wptr);
 
         /* Convert the pointers of Dblock to Physical addr */
         dblkPtr = (SsDblk*)curPtr->b_datap;
@@ -6821,8 +6718,8 @@ PUBLIC S16 SConvPtrPhy (mBuf)
         }
 #endif    
 
-        dblkPtr->db_base = (U8*)cvmx_ptr_to_phys (dblkPtr->db_base);
-        dblkPtr->db_lim = (U8*)cvmx_ptr_to_phys (dblkPtr->db_lim);
+        dblkPtr->db_base = (uint8_t*)cvmx_ptr_to_phys (dblkPtr->db_base);
+        dblkPtr->db_lim = (uint8_t*)cvmx_ptr_to_phys (dblkPtr->db_lim);
 
         curPtr->b_datap = (SsDblk*)cvmx_ptr_to_phys (curPtr->b_datap);
 
@@ -6832,7 +6729,7 @@ PUBLIC S16 SConvPtrPhy (mBuf)
 
   *mBuf = (Buffer*)cvmx_ptr_to_phys (*mBuf);
 
-  RETVALUE(ROK);
+  return ROK;
 
 } /* SConvPtrPhy */
 
@@ -6855,12 +6752,12 @@ PUBLIC S16 SConvPtrPhy (mBuf)
  *
  */
 #ifdef ANSI
-PUBLIC S16 SConvPhyPtr
+S16 SConvPhyPtr
 (
  Buffer  **workPtr
  )
 #else
-PUBLIC S16 SConvPhyPtr (workPtr)
+S16 SConvPhyPtr (workPtr)
   Buffer  **workPtr;
 #endif
 {
@@ -6871,53 +6768,51 @@ PUBLIC S16 SConvPhyPtr (workPtr)
   SsDblk      *dblkPtr;
   SsFrtn      *frtnPtr;
 
-  TRC1(SConvPhyPtr);
-
 
   /* check workPtr for NULLP */
   if ( (workPtr == NULLP) || (*workPtr == NULLP) )
   {
-        RETVALUE(RFAILED);
+        return RFAILED;
   }
 
   /* Convert the buffer address to pointer */
-  mBuf = (Buffer*)cvmx_phys_to_ptr ((U64)(*workPtr));
+  mBuf = (Buffer*)cvmx_phys_to_ptr ((uint64_t)(*workPtr));
 
   curPtr = mBuf;
 
   /* first block is mblk */
   if (curPtr->b_next)
   {
-        curPtr->b_next = (Buffer*)cvmx_phys_to_ptr ((U64)curPtr->b_next);
+        curPtr->b_next = (Buffer*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_next);
   }
 
   if (curPtr->b_prev)
   {
-        curPtr->b_prev = (Buffer*)cvmx_phys_to_ptr ((U64)curPtr->b_prev);
+        curPtr->b_prev = (Buffer*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_prev);
   }
 
   if(curPtr->b_cont)
   {
-        curPtr->b_cont = (Buffer*)cvmx_phys_to_ptr ((U64)curPtr->b_cont);
+        curPtr->b_cont = (Buffer*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_cont);
   }
 
-  curPtr->b_rptr = (U8*)cvmx_phys_to_ptr ((U64)curPtr->b_rptr);
+  curPtr->b_rptr = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_rptr);
 
   /* Get the pointer for minfo */
   minfoPtr = (SsMsgInfo*)curPtr->b_rptr;
 
   if (minfoPtr->endptr)
   {
-        minfoPtr->endptr = (Buffer*)cvmx_phys_to_ptr ((U64)minfoPtr->endptr);
+        minfoPtr->endptr = (Buffer*)cvmx_phys_to_ptr ((uint64_t)minfoPtr->endptr);
   }
   if (minfoPtr->next)
   {
-        minfoPtr->next = (Buffer*)cvmx_phys_to_ptr ((U64)minfoPtr->next);
+        minfoPtr->next = (Buffer*)cvmx_phys_to_ptr ((uint64_t)minfoPtr->next);
   }
 
-  curPtr->b_wptr = (U8*)cvmx_phys_to_ptr ((U64)curPtr->b_wptr);
+  curPtr->b_wptr = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_wptr);
 
-  curPtr->b_datap = (SsDblk*)cvmx_phys_to_ptr ((U64)curPtr->b_datap);
+  curPtr->b_datap = (SsDblk*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_datap);
 
   /* Get the Dblock pointers */
   dblkPtr = (SsDblk*)curPtr->b_datap;
@@ -6926,22 +6821,22 @@ PUBLIC S16 SConvPhyPtr (workPtr)
 #ifdef SS_DBLK_FREE_RTN 
   if (dblkPtr->db_frtnp)
   {
-        dblkPtr->db_frtnp = (SsFrtn*)cvmx_phys_to_ptr ((U64)dblkPtr->db_frtnp);
+        dblkPtr->db_frtnp = (SsFrtn*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_frtnp);
     frtnPtr = dblkPtr->db_frtnp;
 
         if (frtnPtr->free_func)
         {
-               frtnPtr->free_func = cvmx_phys_to_ptr ((U64)frtnPtr->free_func);
+               frtnPtr->free_func = cvmx_phys_to_ptr ((uint64_t)frtnPtr->free_func);
         }
         if (frtnPtr->free_arg)
         {
-               frtnPtr->free_arg = (S8*)cvmx_phys_to_ptr ((U64)frtnPtr->free_arg);
+               frtnPtr->free_arg = (S8*)cvmx_phys_to_ptr ((uint64_t)frtnPtr->free_arg);
         }
   }
 #endif  
 
-  dblkPtr->db_base = (U8*)cvmx_phys_to_ptr ((U64)dblkPtr->db_base);
-  dblkPtr->db_lim = (U8*)cvmx_phys_to_ptr ((U64)dblkPtr->db_lim);
+  dblkPtr->db_base = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_base);
+  dblkPtr->db_lim = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_lim);
 
   curPtr = curPtr->b_cont;
 
@@ -6950,14 +6845,14 @@ PUBLIC S16 SConvPhyPtr (workPtr)
   {
         if(curPtr->b_cont)
         {
-               curPtr->b_cont = (Buffer*)cvmx_phys_to_ptr ((U64)curPtr->b_cont);
+               curPtr->b_cont = (Buffer*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_cont);
         }
 
-        curPtr->b_rptr = (U8*)cvmx_phys_to_ptr ((U64)curPtr->b_rptr);
+        curPtr->b_rptr = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_rptr);
 
-        curPtr->b_wptr = (U8*)cvmx_phys_to_ptr ((U64)curPtr->b_wptr);
+        curPtr->b_wptr = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_wptr);
 
-        curPtr->b_datap = (SsDblk*)cvmx_phys_to_ptr ((U64)curPtr->b_datap);
+        curPtr->b_datap = (SsDblk*)cvmx_phys_to_ptr ((uint64_t)curPtr->b_datap);
 
         /* Get the Dblock pointers */
         dblkPtr = (SsDblk*)curPtr->b_datap;
@@ -6966,23 +6861,23 @@ PUBLIC S16 SConvPhyPtr (workPtr)
 #ifdef SS_DBLK_FREE_RTN 
         if (dblkPtr->db_frtnp)
         {
-               dblkPtr->db_frtnp = (SsFrtn*)cvmx_phys_to_ptr ((U64)dblkPtr->db_frtnp);
+               dblkPtr->db_frtnp = (SsFrtn*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_frtnp);
 
       frtnPtr = dblkPtr->db_frtnp;
 
                if (frtnPtr->free_func)
                {
-                 frtnPtr->free_func = cvmx_phys_to_ptr ((U64)frtnPtr->free_func);
+                 frtnPtr->free_func = cvmx_phys_to_ptr ((uint64_t)frtnPtr->free_func);
                }
                if (frtnPtr->free_arg)
                {
-                 frtnPtr->free_arg = (S8*)cvmx_phys_to_ptr ((U64)frtnPtr->free_arg);
+                 frtnPtr->free_arg = (S8*)cvmx_phys_to_ptr ((uint64_t)frtnPtr->free_arg);
                }
         }
 #endif    
 
-        dblkPtr->db_base = (U8*)cvmx_phys_to_ptr ((U64)dblkPtr->db_base);
-        dblkPtr->db_lim = (U8*)cvmx_phys_to_ptr ((U64)dblkPtr->db_lim);
+        dblkPtr->db_base = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_base);
+        dblkPtr->db_lim = (uint8_t*)cvmx_phys_to_ptr ((uint64_t)dblkPtr->db_lim);
 
         curPtr = curPtr->b_cont;
   }
@@ -6990,7 +6885,7 @@ PUBLIC S16 SConvPhyPtr (workPtr)
   /* Place the converted buffer */
   *workPtr = mBuf;
 
-  RETVALUE(ROK);
+  return ROK;
 
 } /* SConvPhyPtr */
 
@@ -7013,7 +6908,7 @@ PUBLIC S16 SConvPhyPtr (workPtr)
  *
  */
 #ifdef ANSI
-PUBLIC S16 SCpyFpaMsg
+S16 SCpyFpaMsg
 (
  Buffer *srcBuf,
  Region dstRegion,
@@ -7021,7 +6916,7 @@ PUBLIC S16 SCpyFpaMsg
  Buffer **dstBuf
  )
 #else
-PUBLIC S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf)
+S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf)
   Buffer *srcBuf;
   Region dstRegion;
   Pool dstPool;
@@ -7042,19 +6937,17 @@ PUBLIC S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf)
   SsDblk     *dblkPtr = NULLP;
   SsDblk     *dptr = NULLP;
 
-  TRC1(SCpyFpaMsg);
-
 
   if ( srcBuf == (Buffer*)NULLP )
   {
-        RETVALUE(RFAILED);
+        return RFAILED;
   }
 
   if ((dstRegion >= SS_MAX_REGS) || (dstPool >= SS_MAX_POOLS_PER_REG))
   {
         /* Free the source buffer and return failure */
         SPutFpaMsg(srcBuf);
-        RETVALUE(RFAILED);
+        return RFAILED;
   }
 
   /* Allocate memory for destination buffer */
@@ -7062,7 +6955,7 @@ PUBLIC S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf)
   {
         /* Free the source buffer and return failure */
         SPutFpaMsg(srcBuf);
-        RETVALUE(ROUTRES);
+        return (ROUTRES);
   }
 
   /* get the minfo of dest and src buffers */
@@ -7094,7 +6987,7 @@ PUBLIC S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf)
                (Void) SPutMsg(*dstBuf);
                /* Free the source buffer and return failure */
                SPutFpaMsg(srcBuf);
-               RETVALUE(ROUTRES);
+               return (ROUTRES);
         }
 
         dat = (Data *)tmpblk + MDBSIZE;
@@ -7144,7 +7037,7 @@ PUBLIC S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf)
   /* Free the source buffer after copying it */
   SPutFpaMsg(srcBuf);
 
-  RETVALUE(ROK);
+  return ROK;
 
 } /* SCpyFpaMsg */
 
@@ -7168,13 +7061,13 @@ PUBLIC S16 SCpyFpaMsg (srcBuf, dstRegion, dstPool, dstBuf)
  *
  */
 #ifdef ANSI
-PUBLIC S16 SCpyMsgFpa
+S16 SCpyMsgFpa
 (
  Buffer *srcBuf,
  Buffer **dstBuf
  )
 #else
-PUBLIC S16 SCpyMsgFpa (srcBuf, dstBuf)
+S16 SCpyMsgFpa (srcBuf, dstBuf)
   Buffer *srcBuf;
   Buffer **dstBuf;
 #endif
@@ -7189,15 +7082,13 @@ PUBLIC S16 SCpyMsgFpa (srcBuf, dstBuf)
   SsMsgInfo  *minfoDst = NULLP;
   SsDblk     *dblkPtr = NULLP;
   SsDblk     *dptr = NULLP;
-  U32         numBytes;
+  uint32_t         numBytes;
   Pool        pool;
 
-  TRC1(SCpyMsgFpa);
-
 
   if (srcBuf == (Buffer*)NULLP)
   {
-        RETVALUE(RFAILED);
+        return RFAILED;
   }
 
   *dstBuf = (Buffer*)cvmx_fpa_alloc(SS_CVMX_POOL_0);
@@ -7206,7 +7097,7 @@ PUBLIC S16 SCpyMsgFpa (srcBuf, dstBuf)
   {
         /* Free the source buffer before returning  */
         SPutMsg(srcBuf);
-        RETVALUE(ROUTRES);
+        return (ROUTRES);
   }
 
   dat = (Data *)(*dstBuf) + MDBSIZE;
@@ -7264,7 +7155,7 @@ PUBLIC S16 SCpyMsgFpa (srcBuf, dstBuf)
                  SPutFpaMsg(*dstBuf);
                  /* Free the source buffer before returning  */
                  SPutMsg(srcBuf);
-                 RETVALUE(RFAILED);
+                 return RFAILED;
         }
 
         /* Allocate for mBuf and copy both the header and contents */
@@ -7278,7 +7169,7 @@ PUBLIC S16 SCpyMsgFpa (srcBuf, dstBuf)
                SPutFpaMsg(*dstBuf);
                /* Free the source buffer before returning  */
                SPutMsg(srcBuf);
-               RETVALUE(ROUTRES);
+               return (ROUTRES);
         }
 
         dat = (Data *)tmpblk + MDBSIZE;
@@ -7329,7 +7220,7 @@ PUBLIC S16 SCpyMsgFpa (srcBuf, dstBuf)
   /* Free the source buffer after copying it */
   SPutMsg(srcBuf);
 
-  RETVALUE(ROK);
+  return ROK;
 
 } /* SCpyMsgFpa */
 
@@ -7351,25 +7242,24 @@ PUBLIC S16 SCpyMsgFpa (srcBuf, dstBuf)
  *
  */
 #ifdef ANSI
-PUBLIC S16 SPutFpaMsg
+S16 SPutFpaMsg
 (
  Buffer *fpaBuf
 )
 #else
-PUBLIC S16 SPutFpaMsg(fpaBuf)
+S16 SPutFpaMsg(fpaBuf)
 Buffer *fpaBuf;
 #endif
 {
-  U16      size;
+  uint16_t      size;
   Buffer   *curBlk;
   Buffer   *nextBlk;
   SsDblk   *dblkPtr;
 
-  TRC1(SPutFpaMsg);
 
   if( fpaBuf == NULLP )
   {
-        RETVALUE(ROK);
+        return ROK;
   }
 
   curBlk = fpaBuf->b_cont;
@@ -7412,7 +7302,7 @@ Buffer *fpaBuf;
 
   cvmx_fpa_free(fpaBuf, SS_CVMX_POOL_0, 0);
 
-  RETVALUE(ROK);
+  return ROK;
 
 } /* SPutFpaMsg */
 
@@ -7438,7 +7328,7 @@ Buffer *fpaBuf;
 */
 
 #ifdef ANSI
-PUBLIC S16 SCpyPartMsg
+S16 SCpyPartMsg
 (
 Buffer *srcBuf,
 MsgLen idx,
@@ -7446,7 +7336,7 @@ MsgLen cnt,
 Buffer *dstBuf
 )
 #else
-PUBLIC S16 SCpyPartMsg(srcBuf, idx, cnt, dstBuf)
+S16 SCpyPartMsg(srcBuf, idx, cnt, dstBuf)
 Buffer *srcBuf;
 MsgLen idx;
 MsgLen cnt;
@@ -7462,30 +7352,29 @@ Buffer *dstBuf;
    MsgLen    dCnt;
    MsgLen    numCpd;
  
-   TRC1(SCpyPartMsg)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!srcBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SCpyPartMsg : Null src Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (srcBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SCpyPartMsg : Incorrect\
                                                    src buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if(!dstBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SCpyPartMsg : Null dst Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (dstBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SCpyPartMsg : Incorrect\
                                                    dst buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* (ERRCLASS & ERRCLS_INT_PAR) */
 
@@ -7497,7 +7386,7 @@ Buffer *dstBuf;
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SCpyPartMsg : Incorrect\
                                                    idx value ");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    sBuf = srcBuf->b_cont;
@@ -7532,7 +7421,7 @@ Buffer *dstBuf;
          {
             SSLOGERROR(ERRCLS_DEBUG, ESS125, ERRZERO, "SCpyPartMsg : SGetDBuf\
                  failed");
-            RETVALUE(ROUTRES);
+            return (ROUTRES);
          }
          dCnt = MIN(cnt, (dBuf->b_datap->db_lim - dBuf->b_datap->db_base));
          dPrev->b_cont = dBuf;
@@ -7585,7 +7474,7 @@ Buffer *dstBuf;
    dMinfo->len += numCpd;
    dMinfo->endptr = dBuf; 
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -7605,7 +7494,7 @@ Buffer *dstBuf;
 */
 
 #ifdef ANSI
-PUBLIC S16 SRepPartMsg
+S16 SRepPartMsg
 (
 Buffer *srcBuf,
 MsgLen idx,
@@ -7613,7 +7502,7 @@ MsgLen cnt,
 Buffer *dstBuf
 )
 #else
-PUBLIC S16 SRepPartMsg(srcBuf, idx, cnt, dstBuf)
+S16 SRepPartMsg(srcBuf, idx, cnt, dstBuf)
 Buffer *srcBuf;
 MsgLen idx;
 MsgLen cnt;
@@ -7629,30 +7518,29 @@ Buffer *dstBuf;
    MsgLen     sIdx;
    MsgLen     cpBytes;
 
-   TRC1(SRepPartMsg)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (!dstBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SRepPartMsg : Null dstBuf");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (dstBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SRepPartMsg : Incorrect\
                                                    dstBuf buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if(!srcBuf)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SRepPartMsg : Null Src Buffer ");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (srcBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SRepPartMsg : Incorrect\
                                                    sBuf buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif  /* (ERRCLASS & ERRCLS_INT_PAR) */
 
@@ -7663,7 +7551,7 @@ Buffer *dstBuf;
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SRepPartMsg : Incorrect\
                                                    cnt value ");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    dBuf = dstBuf->b_cont;
@@ -7706,10 +7594,10 @@ Buffer *dstBuf;
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SRepPartMsg : unable to replace\
                                                     some bytes ");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -7748,14 +7636,14 @@ Buffer *dstBuf;
 
 
 #ifdef ANSI
-PUBLIC S16 SMovPartMsg
+S16 SMovPartMsg
 (
 Buffer *srcBuf,              /* message 1 */
 MsgLen idx,                 /* index */
 Buffer *dstBuf              /* message 2 */
 )
 #else
-PUBLIC S16 SMovPartMsg(srcBuf, idx, dstBuf)
+S16 SMovPartMsg(srcBuf, idx, dstBuf)
 Buffer *srcBuf;              /* message 1 */
 MsgLen idx;                 /* index */
 Buffer *dstBuf;             /* message 2 */
@@ -7770,28 +7658,27 @@ Buffer *dstBuf;             /* message 2 */
    SsMsgInfo  *dMinfo;
 #ifdef T2K_MEM_LEAK_DBG
    char* file = __FILE__;
-   U32 line = __LINE__;
+   uint32_t line = __LINE__;
 #endif
 
-   TRC1(SMovPartMsg)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer 1 */
    if ((!srcBuf) || (!dstBuf ))
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS097, ERRZERO, "SMovPartMsg : Null Buffer (src or Dst)");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (idx < 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS099, ERRZERO, "SMovPartMsg : Invalid index");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if ((srcBuf->b_datap->db_type != SS_M_PROTO) || (dstBuf->b_datap->db_type != SS_M_PROTO)) 
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS100, ERRZERO, "SMovPartMsg : Incorrect buffer\
                                                    type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -7805,7 +7692,7 @@ Buffer *dstBuf;             /* message 2 */
    /*-- ss008.301 */
    if (idx > sMinfo->len)
    {
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    }
 
    /* one block might not sufficient - Check for generic implementation */
@@ -7827,7 +7714,7 @@ Buffer *dstBuf;             /* message 2 */
          {
             SSLOGERROR(ERRCLS_DEBUG, ESS125, ERRZERO, "SCpyMsgPartMsg : SGetDBuf\
                  failed");
-            RETVALUE(ROUTRES);
+            return (ROUTRES);
          }
          dCnt = MIN(idx, (dBuf->b_datap->db_lim - dBuf->b_datap->db_base));
          dPrev->b_cont = dBuf;
@@ -7888,10 +7775,10 @@ Buffer *dstBuf;             /* message 2 */
       dMinfo->len -= idx;
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SMovPartMsg : unable to copy\
                                                     some bytes ");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -7923,14 +7810,14 @@ Buffer *dstBuf;             /* message 2 */
 */
  
 #ifdef ANSI
-PUBLIC S16 SPkMsgMult
+S16 SPkMsgMult
 (
 Data *src,
 MsgLen cnt,
 Buffer *mBuf
 )
 #else
-PUBLIC S16 SPkMsgMult(src, cnt, mBuf)
+S16 SPkMsgMult(src, cnt, mBuf)
 Data *src;
 MsgLen cnt;
 Buffer *mBuf;
@@ -7942,33 +7829,32 @@ Buffer *mBuf;
    MsgLen numBytes;  /* no. of bytes to be copied */
    MsgLen offset;
 
-   TRC1(SPkMsgMult)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* check message buffer */
    if (mBuf == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS070, ERRZERO, "SPkMsgMult:Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check source */
    if (src == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS071, ERRZERO, "SPkMsgMult:Null Buffer");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* check count */
    if (cnt <= 0)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS072, ERRZERO, "SPkMsgMult: Invalid\
                                                    count");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (mBuf->b_datap->db_type != SS_M_PROTO)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESS073, ERRZERO, "SPkMsgMult: Incorrect\
                                                    buffer type");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -7993,36 +7879,31 @@ Buffer *mBuf;
       /* update the read ptr */
       tmp->b_rptr -= numBytes;
       /* copy data */
-      memcpy((U8*)tmp->b_rptr, (src + cnt), numBytes);
+      memcpy(tmp->b_rptr, (src + cnt), numBytes);
       minfo->len += numBytes;
       if (!cnt)
       {
-         RETVALUE(ROK);
+         return ROK;
       }
    }
 
-#if 0
-   char * file = __FILE__;
-   U32  line   = __LINE__;
-#endif
-
    /* allocate a DBlk minimum of size Cnt to pack the data */
    newblk = NULLP;
    if (ssGetDBufOfSize(minfo->region, cnt, &newblk) != ROK)
    {
-       RETVALUE(ROUTRES);
+       return (ROUTRES);
    }
    newblk->b_datap->db_type = SS_M_DATA;
    newblk->b_rptr = newblk->b_datap->db_lim - cnt;
    newblk->b_wptr = newblk->b_datap->db_lim;
-   memcpy((U8*)newblk->b_rptr, src, cnt);
+   memcpy(newblk->b_rptr, src, cnt);
    /* attach the newblk chain into mBuf */
    newblk->b_cont = tmp;
    mBuf->b_cont = newblk;
    minfo->len += cnt;
    minfo->endptr = newblk;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 /* ss006.301 : new buffer management APIs, end */
 /*
@@ -8040,16 +7921,16 @@ Buffer *mBuf;
 *
 */
 #ifdef ANSI
-PUBLIC S16 SGetReadPtr
+S16 SGetReadPtr
 (
  Buffer *mBuf, 
U8** data, 
uint8_t** data, 
  MsgLen *len
 )
 #else
-PUBLIC S16 SGetReadPtr (mBuf, data, len)
+S16 SGetReadPtr (mBuf, data, len)
 Buffer *mBuf; 
-U8** data; 
+uint8_t** data; 
 MsgLen *len;
 #endif 
 {
@@ -8066,7 +7947,7 @@ MsgLen *len;
       *len = 0;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 #ifdef SS_USE_ZBC_MEMORY
 /*
@@ -8089,7 +7970,7 @@ MsgLen *len;
 */
 
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SAttachPtrToBufNew
+S16 SAttachPtrToBufNew
 (
 Region   region,
 Pool     pool,
@@ -8097,11 +7978,11 @@ Data    *ptr,
 MsgLen   totalLen,
 Buffer** mBuf,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SAttachPtrToBuf
+S16 SAttachPtrToBuf
 (
 Region   region,
 Pool     pool,
@@ -8110,7 +7991,7 @@ MsgLen   totalLen,
 Buffer** mBuf
 )
 #else
-PUBLIC S16 SAttachPtrToBuf(region, pool, ptr, totalLen, mBuf)
+S16 SAttachPtrToBuf(region, pool, ptr, totalLen, mBuf)
 Region   region;
 Pool     pool;
 Data    *ptr;
@@ -8125,13 +8006,12 @@ Buffer** mBuf;
    Buffer    *newblk;
    /*   Void      *iccHdlr; */
 
-   TRC1(SAttachPtrToBuf)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (ptr == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SAttachPtrToBuf: Null PTR");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -8141,20 +8021,20 @@ Buffer** mBuf;
    if(SGetMsg(region, pool, mBuf) != ROK)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SAttachPtrToBuf: SGetMsg Failed");
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
 
    mdsize = MDBSIZE;
 
 #ifdef SS_HISTOGRAM_SUPPORT 
-   if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (U8*) __FILE__, ENTNC) != ROK)
+   if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (uint8_t*) __FILE__, ENTNC) != ROK)
 #else
    if (SAlloc(region, &mdsize, 0, (Data **) &newblk) != ROK)
 #endif /* SS_HISTOGRAM_SUPPORT */
    {
        SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SAttachPtrToBuf: SAlloc Failed");
        SPutMsg(*mBuf);
-       RETVALUE(ROUTRES);
+       return (ROUTRES);
    }
 
    (*mBuf)->b_cont = newblk;
@@ -8183,7 +8063,7 @@ Buffer** mBuf;
    minfo->len = totalLen;
    minfo->endptr = newblk;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -8208,7 +8088,7 @@ PRIVATE S16 SPutZbcDBufNew
 Region region,
 Buffer *buf,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
@@ -8228,7 +8108,6 @@ Buffer *buf;
    MsgLen          bufLen;
    S16             ret = ROK;
  
-   TRC2(SPutZbcDBuf);
  
    dptr = buf->b_datap; 
    /* Get the length of the buffer */
@@ -8246,14 +8125,14 @@ Buffer *buf;
 
 #ifdef SS_HISTOGRAM_SUPPORT 
       ret = SFree(region, (Data *) buf->b_datap->db_base, bufLen, __LINE__, 
-                  (U8*) __FILE__, ENTNC);
+                  (uint8_t*) __FILE__, ENTNC);
 #else
       ret = SFree(region, (Data *) buf->b_datap->db_base, bufLen);
 #endif /* SS_HISTOGRAM_SUPPORT */
 
       /* if the data block is not shared, free the buffer, checks not reqd */
 #ifdef SS_HISTOGRAM_SUPPORT 
-      ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (U8*) __FILE__, 
+      ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (uint8_t*) __FILE__, 
                   ENTNC);
 #else
       ret =  SFree(region, (Data *) buf, MDBSIZE);
@@ -8268,7 +8147,7 @@ Buffer *buf;
        {
           SSLOGERROR(ERRCLS_DEBUG, ESSXXX, ERRZERO,
                 "Could not lock the mBuf Ref Lock");
-          RETVALUE(RFAILED);
+          return RFAILED;
        }
 #endif
       --dptr->db_ref;
@@ -8276,7 +8155,7 @@ Buffer *buf;
       if (buf != (SsMblk *) (((Data*) dptr) - MBSIZE))
       {
 #ifdef SS_HISTOGRAM_SUPPORT 
-         ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (U8*) __FILE__, ENTNC);
+         ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (uint8_t*) __FILE__, ENTNC);
 #else
          ret = SFree(region, (Data *) buf, MDBSIZE);
 #endif /* SS_HISTOGRAM_SUPPORT */
@@ -8294,25 +8173,25 @@ Buffer *buf;
 #endif
 #ifdef SS_HISTOGRAM_SUPPORT 
          ret = SFree(region, (Data *) buf->b_datap->db_base, bufLen, __LINE__, 
-                   (U8*) __FILE__, ENTNC);
+                   (uint8_t*) __FILE__, ENTNC);
 #else
          ret = SFree(region, (Data *) buf->b_datap->db_base, bufLen);
 #endif /* SS_HISTOGRAM_SUPPORT */
 
 #ifdef SS_HISTOGRAM_SUPPORT 
-         ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (U8*) __FILE__, 
+         ret = SFree(region, (Data *) buf, MDBSIZE, __LINE__, (uint8_t*) __FILE__, 
                   ENTNC);
 #else
          ret =  SFree(region, (Data *) buf, MDBSIZE);
 #endif /* SS_HISTOGRAM_SUPPORT */
-          RETVALUE(ret);
+          return (ret);
       }
 #ifndef SS_DBUF_REFLOCK_DISABLE
       ret = SUnlock(&(dptr->dBufLock));
 #endif
    }
 
-   RETVALUE(ret);
+   return (ret);
 }
 #endif /* SS_USE_ZBC_MEMORY */
 
@@ -8337,7 +8216,7 @@ Buffer *buf;
 *
 */
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SAttachPtrToMBuf1
+S16 SAttachPtrToMBuf1
 (
 Region   region,
 Pool     pool,
@@ -8346,11 +8225,11 @@ MsgLen   totalLen,
 MsgLen   ptrLen,
 Buffer** mBuf,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SAttachPtrToMBuf
+S16 SAttachPtrToMBuf
 (
 Region   region,
 Pool     pool,
@@ -8360,7 +8239,7 @@ MsgLen   ptrLen,
 Buffer** mBuf
 )
 #else
-PUBLIC S16 SAttachPtrToMBuf(region, pool, ptr, totalLen, ptrLen, mBuf)
+S16 SAttachPtrToMBuf(region, pool, ptr, totalLen, ptrLen, mBuf)
 Region   region;
 Pool     pool;
 Data    *ptr;
@@ -8376,34 +8255,33 @@ Buffer** mBuf;
    Buffer    *newblk;
    /*   Void      *iccHdlr; */
 
-   TRC1(SAttachPtrToMBuf)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (ptr == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SAttachPtrToBuf: Null PTR");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
    if(SGetMsg(region, pool, mBuf) != ROK)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SAttachPtrToBuf: SGetMsg Failed");
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
 
    region = 0;
    mdsize = MDBSIZE;
 
 #ifdef SS_HISTOGRAM_SUPPORT 
-   if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (U8*) __FILE__, ENTNC) != ROK)
+   if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (uint8_t*) __FILE__, ENTNC) != ROK)
 #else
    if (SAlloc(region, &mdsize, 0, (Data **) &newblk) != ROK)
 #endif /* SS_HISTOGRAM_SUPPORT */
    {
        SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SAttachPtrToBuf: SAlloc Failed");
        SPutMsg(*mBuf);
-       RETVALUE(ROUTRES);
+       return (ROUTRES);
    }
 
    (*mBuf)->b_cont = newblk;
@@ -8433,20 +8311,20 @@ Buffer** mBuf;
    minfo->endptr = newblk;
 
    //printf("Mbuf PTR = %x, DBlk PTR = %x, PTR = %x\n", *mBuf, newblk, ptr);
-   RETVALUE(ROK);
+   return ROK;
 }
 #endif /* INTEL_WLS */
-PUBLIC S16 SIncMsgRef(Buffer *srcBuf,Region dstRegion, Pool dstPool,Buffer **dstBuf)
+S16 SIncMsgRef(Buffer *srcBuf,Region dstRegion, Pool dstPool,Buffer **dstBuf)
 {
 #ifndef L2_OPTMZ 
-  RETVALUE(SAddMsgRef(srcBuf,dstRegion, dstPool,dstBuf));
+  return (SAddMsgRef(srcBuf,dstRegion, dstPool,dstBuf));
 #else 
  *dstBuf = srcBuf;
 #endif 
-  RETVALUE(ROK);
+  return ROK;
 }
 #ifdef L2_OPTMZ
-PUBLIC Void SResetMBuf(Buffer *mbuf)
+Void SResetMBuf(Buffer *mbuf)
 {
    SsMsgInfo *minfo;
    Buffer *tmp;
@@ -8469,7 +8347,7 @@ PUBLIC Void SResetMBuf(Buffer *mbuf)
 #endif
 
 
-   RETVOID;
+   return;
 }
 #endif
 
@@ -8493,7 +8371,7 @@ PUBLIC Void SResetMBuf(Buffer *mbuf)
 *
 */
 #ifdef T2K_MEM_LEAK_DBG
-PUBLIC S16 SAttachWlsPtrToMBuf1
+S16 SAttachWlsPtrToMBuf1
 (
 Region   region,
 Pool     pool,
@@ -8503,11 +8381,11 @@ MsgLen   totalLen,
 MsgLen   ptrLen,
 Buffer** mBuf,
 char* file,
-U32 line
+uint32_t line
 )
 #else
 #ifdef ANSI
-PUBLIC S16 SAttachWlsPtrToMBuf
+S16 SAttachWlsPtrToMBuf
 (
 Region   region,
 Pool     pool,
@@ -8518,7 +8396,7 @@ MsgLen   ptrLen,
 Buffer** mBuf
 )
 #else
-PUBLIC S16 SAttachWlsPtrToMBuf(region, pool, ptr, readPtr, totalLen, ptrLen, mBuf)
+S16 SAttachWlsPtrToMBuf(region, pool, ptr, readPtr, totalLen, ptrLen, mBuf)
 Region   region;
 Pool     pool;
 Data    *ptr;
@@ -8535,13 +8413,12 @@ Buffer** mBuf;
    Buffer    *newblk;
    /*   Void      *iccHdlr; */
 
-   TRC1(SAttachWlsPtrToMBuf)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (ptr == NULLP)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SAttachPtrToBuf: Null PTR");
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -8549,20 +8426,20 @@ Buffer** mBuf;
    if(SGetMsg(region, pool, mBuf) != ROK)
    {
       SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SAttachPtrToBuf: SGetMsg Failed");
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
 
    mdsize = MDBSIZE;
 
 #ifdef SS_HISTOGRAM_SUPPORT 
-   if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (U8*) __FILE__, ENTNC) != ROK)
+   if (SAlloc(region, &mdsize, 0, (Data **) &newblk, __LINE__, (uint8_t*) __FILE__, ENTNC) != ROK)
 #else
    if (SAlloc(region, &mdsize, 0, (Data **) &newblk) != ROK)
 #endif /* SS_HISTOGRAM_SUPPORT */
    {
        SSLOGERROR(ERRCLS_INT_PAR, ESSXXX, ERRZERO, "SAttachPtrToBuf: SAlloc Failed");
        SPutMsg(*mBuf);
-       RETVALUE(ROUTRES);
+       return (ROUTRES);
    }
 
    (*mBuf)->b_cont = newblk;
@@ -8592,14 +8469,14 @@ Buffer** mBuf;
    minfo->endptr = newblk;
 
    //printf("Mbuf PTR = %x, DBlk PTR = %x, PTR = %x\n", *mBuf, newblk, ptr);
-   RETVALUE(ROK);
+   return ROK;
 }
 
 #ifdef TENB_DPDK_BUF
 
-extern U32 numeTti;
+extern uint32_t numeTti;
 
-PUBLIC S16 SGetSBufDpdk
+S16 SGetSBufDpdk
 (
 Data **ptr,                     /* pointer to buffer */
 Size size                       /* size requested */
@@ -8609,23 +8486,23 @@ Size size                       /* size requested */
     
     *ptr = ntl_alloc(mtGetNtlHdl(), size);
 
-    RETVALUE(ret);
+    return (ret);
 }
 
-PUBLIC S16 SPutSBufDpdk
+S16 SPutSBufDpdk
 (
 Data *ptr                     /* pointer to buffer */
 )
 {
     S16   ret;
-    U32   flags = 0;
+    uint32_t   flags = 0;
 
     ntl_free(mtGetNtlHdl(), ptr);
 
-    RETVALUE(ret);
+    return (ret);
 }
 
-PUBLIC S16 SDetachDpdkPtrFrmDBuf
+S16 SDetachDpdkPtrFrmDBuf
 (
 Buffer     *mBuf,
 Data       **ptr
@@ -8636,8 +8513,8 @@ Data       **ptr
     SsMsgInfo    *minfo;
 
     //msgBlk = mBuf->b_cont;
-    //*ptr   = msgBlk->b_rptr;;
-    *ptr   = mBuf->b_datap->db_base;;
+    //*ptr   = msgBlk->b_rptr;
+    *ptr   = mBuf->b_datap->db_base;
 
     mBuf->b_cont = NULL;
 
@@ -8645,11 +8522,11 @@ Data       **ptr
     //minfo->len    = 0;
 
 
-    RETVALUE(ROK);
+    return ROK;
 }
 
 
-PUBLIC S16 SDetachDpdkPtrFrmMBuf
+S16 SDetachDpdkPtrFrmMBuf
 (
  Buffer     *mBuf,
  Data       **ptr
@@ -8666,29 +8543,29 @@ PUBLIC S16 SDetachDpdkPtrFrmMBuf
    if(msgBlk == NULLP)
    {
       *ptr = NULLP;
-       RETVALUE(RFAILED);
+       return RFAILED;
    }
       
    dptr = msgBlk->b_datap;
    if(dptr->db_type != SS_MEM_TYPE_DPDK_ZBC)
    {
       *ptr = NULLP;
-      RETVALUE(RFAILED);
+      return RFAILED;
    }   
 
-   *ptr   = msgBlk->b_rptr;;
+   *ptr   = msgBlk->b_rptr;
 
    mBuf->b_cont = NULL;
 
    minfo         = (SsMsgInfo*) mBuf->b_rptr;
    minfo->len    = 0;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 
 #ifdef ANSI
-PUBLIC S16 SAttachDpdkPtrToMBuf
+S16 SAttachDpdkPtrToMBuf
 (
 Region   region,
 Pool     pool,
@@ -8699,7 +8576,7 @@ MsgLen   totalLen,
 Buffer** mBuf
 )
 #else
-PUBLIC S16 SAttachDpdkPtrToMBuf(region, pool, ptr, readPtr, msgLen, totalLen, mBuf)
+S16 SAttachDpdkPtrToMBuf(region, pool, ptr, readPtr, msgLen, totalLen, mBuf)
 Region   region;
 Pool     pool;
 Data    *ptr;
@@ -8713,14 +8590,14 @@ Buffer** mBuf;
    SsDblk    *dptr;
 
    if(0 == msgLen)
-      RETVALUE(RFAILED);
+      return RFAILED;
 
    SAttachWlsPtrToMBuf(region, pool, ptr, readPtr, msgLen, totalLen, mBuf);
    dptr = (SsDblk*) (((Data *) ((*mBuf)->b_cont)) + MBSIZE);
    
    dptr->db_type = SS_MEM_TYPE_DPDK_ZBC;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 #endif /* TENB_DPDK_BUF */