diff --git a/components/nstackx/fillp/src/fillp_lib/include/fillp/fillp.h b/components/nstackx/fillp/src/fillp_lib/include/fillp/fillp.h index dc88936dc..5e0bc0b31 100644 --- a/components/nstackx/fillp/src/fillp_lib/include/fillp/fillp.h +++ b/components/nstackx/fillp/src/fillp_lib/include/fillp/fillp.h @@ -388,7 +388,7 @@ typedef enum InnerfillpClientfourhandshakestateEnum { static __inline FILLP_INT FillpNumIsbigger(FILLP_UINT32 value1, FILLP_UINT32 value2) { - return ((FILLP_INT32)(value1 - value2)) > 0; + return value1 > value2; } void FillpSendConnConfirmAck(struct FillpPcb *pcb); diff --git a/components/nstackx/fillp/src/fillp_lib/src/hmac.c b/components/nstackx/fillp/src/fillp_lib/src/hmac.c index f8f3fd982..ac55bc1d7 100644 --- a/components/nstackx/fillp/src/fillp_lib/src/hmac.c +++ b/components/nstackx/fillp/src/fillp_lib/src/hmac.c @@ -43,17 +43,18 @@ Return : NA ******************************************************************************/ static void FillpCleanSedata(void *ptr, size_t len, struct SpungeInstance *pcbInst) { - FILLP_UINT8 *pptr = ptr; - size_t loop = len; - size_t ctr = pcbInst->cleanseDataCtr; - if (ptr == FILLP_NULL_PTR) { return; } - while (loop--) { + FILLP_UINT8 *pptr = ptr; + size_t loop = len; + size_t ctr = pcbInst->cleanseDataCtr; + + while (loop > 0) { *(pptr++) = (FILLP_UINT8)ctr; ctr += (CSE_DATA_ONE_PAR + ((size_t)(uintptr_t)pptr & 0xF)); + loop--; } pptr = FILLP_MEMCHR(ptr, (FILLP_UINT8)ctr, len); diff --git a/components/nstackx/fillp/src/fillp_lib/src/spunge_stack.c b/components/nstackx/fillp/src/fillp_lib/src/spunge_stack.c index 28b17709d..4b9d169ab 100644 --- a/components/nstackx/fillp/src/fillp_lib/src/spunge_stack.c +++ b/components/nstackx/fillp/src/fillp_lib/src/spunge_stack.c @@ -354,7 +354,7 @@ FILLP_BOOL SpungeConnCheckUnsendBoxEmpty(struct FtNetconn *conn) con = unsendBox->ring.cons.head + 1; prod = unsendBox->ring.prod.tail; - while (((FILLP_LLONG)(prod - con)) >= 0) { + while (prod >= con) { data = unsendBox->ring.ringCache[con % unsendBox->ring.size]; con++;