Skip to content

Commit

Permalink
fix scan-build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaeckel committed Apr 10, 2019
1 parent 99fcbea commit 19e7f73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions demos/gcm-file/gcm_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
@param out The output file
@param taglen The MAC tag length
@param direction Encrypt or Decrypt mode (GCM_ENCRYPT or GCM_DECRYPT)
@param res [out] Result of the operation, 1==valid, 0==invalid
@return CRYPT_OK on success
*/
int gcm_file( int cipher,
Expand All @@ -56,6 +57,8 @@ int gcm_file( int cipher,
LTC_ARGCHK(out != NULL);
LTC_ARGCHK(res != NULL);

*res = 0;

f_in = fopen(in, "rb");
if (f_in == NULL) {
err = CRYPT_FILE_NOTFOUND;
Expand Down
1 change: 1 addition & 0 deletions demos/gcm-file/gcm_filehandle.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
@param out The output file
@param taglen The MAC tag length
@param direction Encrypt or Decrypt mode (GCM_ENCRYPT or GCM_DECRYPT)
@param res [out] Result of the operation, 1==valid, 0==invalid
@return CRYPT_OK on success
*/
int gcm_filehandle( int cipher,
Expand Down

0 comments on commit 19e7f73

Please sign in to comment.