diff --git a/src/internal.c b/src/internal.c index 30c27fbcbd..baed4b865a 100644 --- a/src/internal.c +++ b/src/internal.c @@ -11160,8 +11160,7 @@ static WC_INLINE int GrowAnOutputBuffer(WOLFSSL* ssl, return MEMORY_E; #if WOLFSSL_GENERAL_ALIGNMENT > 0 - if (align) - tmp += align - hdrSz; + tmp += align - hdrSz; #endif #ifdef WOLFSSL_STATIC_MEMORY @@ -11181,11 +11180,10 @@ static WC_INLINE int GrowAnOutputBuffer(WOLFSSL* ssl, } #if WOLFSSL_GENERAL_ALIGNMENT > 0 - if (align) - outputBuffer->offset = align - hdrSz; - else + outputBuffer->offset = align - hdrSz; +#else + outputBuffer->offset = 0; #endif - outputBuffer->offset = 0; outputBuffer->buffer = tmp; outputBuffer->dynamicFlag = 1; @@ -11241,8 +11239,7 @@ static WC_INLINE int GrowOutputBuffer(WOLFSSL* ssl, int size) return MEMORY_E; #if WOLFSSL_GENERAL_ALIGNMENT > 0 - if (align) - tmp += align - hdrSz; + tmp += align - hdrSz; #endif #ifdef WOLFSSL_STATIC_MEMORY @@ -11267,11 +11264,10 @@ static WC_INLINE int GrowOutputBuffer(WOLFSSL* ssl, int size) ssl->buffers.outputBuffer.dynamicFlag = 1; #if WOLFSSL_GENERAL_ALIGNMENT > 0 - if (align) - ssl->buffers.outputBuffer.offset = align - hdrSz; - else + ssl->buffers.outputBuffer.offset = align - hdrSz; +#else + ssl->buffers.outputBuffer.offset = 0; #endif - ssl->buffers.outputBuffer.offset = 0; ssl->buffers.outputBuffer.buffer = tmp; ssl->buffers.outputBuffer.bufferSize = newSz;