Skip to content

Commit 6de31e9

Browse files
committed
Fix Coverity dead code report
1 parent 59f4fa5 commit 6de31e9

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

src/internal.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11160,8 +11160,7 @@ static WC_INLINE int GrowAnOutputBuffer(WOLFSSL* ssl,
1116011160
return MEMORY_E;
1116111161

1116211162
#if WOLFSSL_GENERAL_ALIGNMENT > 0
11163-
if (align)
11164-
tmp += align - hdrSz;
11163+
tmp += align - hdrSz;
1116511164
#endif
1116611165

1116711166
#ifdef WOLFSSL_STATIC_MEMORY
@@ -11181,11 +11180,10 @@ static WC_INLINE int GrowAnOutputBuffer(WOLFSSL* ssl,
1118111180
}
1118211181

1118311182
#if WOLFSSL_GENERAL_ALIGNMENT > 0
11184-
if (align)
11185-
outputBuffer->offset = align - hdrSz;
11186-
else
11183+
outputBuffer->offset = align - hdrSz;
11184+
#else
11185+
outputBuffer->offset = 0;
1118711186
#endif
11188-
outputBuffer->offset = 0;
1118911187

1119011188
outputBuffer->buffer = tmp;
1119111189
outputBuffer->dynamicFlag = 1;
@@ -11241,8 +11239,7 @@ static WC_INLINE int GrowOutputBuffer(WOLFSSL* ssl, int size)
1124111239
return MEMORY_E;
1124211240

1124311241
#if WOLFSSL_GENERAL_ALIGNMENT > 0
11244-
if (align)
11245-
tmp += align - hdrSz;
11242+
tmp += align - hdrSz;
1124611243
#endif
1124711244

1124811245
#ifdef WOLFSSL_STATIC_MEMORY
@@ -11267,11 +11264,10 @@ static WC_INLINE int GrowOutputBuffer(WOLFSSL* ssl, int size)
1126711264
ssl->buffers.outputBuffer.dynamicFlag = 1;
1126811265

1126911266
#if WOLFSSL_GENERAL_ALIGNMENT > 0
11270-
if (align)
11271-
ssl->buffers.outputBuffer.offset = align - hdrSz;
11272-
else
11267+
ssl->buffers.outputBuffer.offset = align - hdrSz;
11268+
#else
11269+
ssl->buffers.outputBuffer.offset = 0;
1127311270
#endif
11274-
ssl->buffers.outputBuffer.offset = 0;
1127511271

1127611272
ssl->buffers.outputBuffer.buffer = tmp;
1127711273
ssl->buffers.outputBuffer.bufferSize = newSz;

0 commit comments

Comments
 (0)