mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
src/wolfio.c: fixes for cppcheck complaints: nullPointer uninitvar
This commit is contained in:
@@ -1234,7 +1234,7 @@ int wolfIO_HttpProcessResponse(int sfd, const char** appStrList,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* read data if no \r\n or first time */
|
/* read data if no \r\n or first time */
|
||||||
if (end == NULL) {
|
if ((start == NULL) || (end == NULL)) {
|
||||||
result = wolfIO_Recv(sfd, (char*)httpBuf+len, httpBufSz-len-1, 0);
|
result = wolfIO_Recv(sfd, (char*)httpBuf+len, httpBufSz-len-1, 0);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
len += result;
|
len += result;
|
||||||
@@ -2577,7 +2577,7 @@ int LwIPNativeReceive(WOLFSSL* ssl, char* buf, int sz, void* ctx)
|
|||||||
WOLFSSL_LWIP_NATIVE_STATE* nlwip;
|
WOLFSSL_LWIP_NATIVE_STATE* nlwip;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (nlwip == NULL || ctx == NULL) {
|
if (ctx == NULL) {
|
||||||
return WOLFSSL_CBIO_ERR_GENERAL;
|
return WOLFSSL_CBIO_ERR_GENERAL;
|
||||||
}
|
}
|
||||||
nlwip = (WOLFSSL_LWIP_NATIVE_STATE*)ctx;
|
nlwip = (WOLFSSL_LWIP_NATIVE_STATE*)ctx;
|
||||||
|
Reference in New Issue
Block a user