forked from wolfSSL/wolfssl
Fixes from using cppcheck tool
Various fixes for uninitialized variable use. sniffer.c: close file when seek fails tls.c: fix QSH_GET_SIZE macro wolfio.c: uIPGenerateCookie: use the parameter, _ctx, instead of self referencing. wolfssl_adds.c: check for equivalent to XBADFILE to indicate error. SP: change right shift of signed value to unsigned sp_int.h: define 128-bit types types.h: change a XMALLOC define to not use (,,) - cppcheck doesn't like it and is unnecessary.
This commit is contained in:
@@ -209,7 +209,7 @@ RsaKey* GetRsaPrivateKey(const char* keyFile)
|
||||
word32 idx = 0;
|
||||
XFILE file = XFOPEN(keyFile, "rb");
|
||||
|
||||
if (file != XBADFILE)
|
||||
if (file == XBADFILE)
|
||||
{
|
||||
free(key);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user