Skip to content

Commit aaf40aa

Browse files
committed
Removed ferror(NULL) from lms_common
1 parent 428a943 commit aaf40aa

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

tools/lms/lms_common.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ static int lms_write_key(const byte * priv, word32 privSz, void * context)
4848
/* Create the file if it didn't exist. */
4949
file = fopen(filename, "w+");
5050
if (!file) {
51-
fprintf(stderr, "error: fopen(%s, \"w+\") failed: %d\n", filename,
52-
ferror(file));
51+
fprintf(stderr, "error: fopen(%s, \"w+\") failed.\n", filename);
5352
return WC_LMS_RC_WRITE_FAIL;
5453
}
5554
}
@@ -72,8 +71,7 @@ static int lms_write_key(const byte * priv, word32 privSz, void * context)
7271
* storage correctly. */
7372
file = fopen(filename, "r+");
7473
if (!file) {
75-
fprintf(stderr, "error: fopen(%s, \"r+\") failed: %d\n", filename,
76-
ferror(file));
74+
fprintf(stderr, "error: fopen(%s, \"r+\") failed.\n", filename);
7775
return WC_LMS_RC_WRITE_FAIL;
7876
}
7977

0 commit comments

Comments
 (0)