mirror of https://github.com/wolfSSL/wolfBoot.git
Fix ferror(NULL) in xmss_common.h
parent
c748f4c809
commit
04a6ec66a6
|
@ -48,8 +48,7 @@ static enum wc_XmssRc xmss_write_key(const byte * priv, word32 privSz, void * co
|
||||||
/* Create the file if it didn't exist. */
|
/* Create the file if it didn't exist. */
|
||||||
file = fopen(filename, "w+");
|
file = fopen(filename, "w+");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
fprintf(stderr, "error: fopen(%s, \"w+\") failed: %d\n", filename,
|
fprintf(stderr, "error: fopen(%s, \"w+\") failed.\n", filename);
|
||||||
ferror(file));
|
|
||||||
return WC_XMSS_RC_WRITE_FAIL;
|
return WC_XMSS_RC_WRITE_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,8 +71,7 @@ static enum wc_XmssRc xmss_write_key(const byte * priv, word32 privSz, void * co
|
||||||
* storage correctly. */
|
* storage correctly. */
|
||||||
file = fopen(filename, "r+");
|
file = fopen(filename, "r+");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
fprintf(stderr, "error: fopen(%s, \"r+\") failed: %d\n", filename,
|
fprintf(stderr, "error: fopen(%s, \"r+\") failed.\n", filename);
|
||||||
ferror(file));
|
|
||||||
return WC_XMSS_RC_WRITE_FAIL;
|
return WC_XMSS_RC_WRITE_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue