Skip to content

Commit 19e7f73

Browse files
committed
fix scan-build warnings
1 parent 99fcbea commit 19e7f73

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

demos/gcm-file/gcm_file.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
@param out The output file
3838
@param taglen The MAC tag length
3939
@param direction Encrypt or Decrypt mode (GCM_ENCRYPT or GCM_DECRYPT)
40+
@param res [out] Result of the operation, 1==valid, 0==invalid
4041
@return CRYPT_OK on success
4142
*/
4243
int gcm_file( int cipher,
@@ -56,6 +57,8 @@ int gcm_file( int cipher,
5657
LTC_ARGCHK(out != NULL);
5758
LTC_ARGCHK(res != NULL);
5859

60+
*res = 0;
61+
5962
f_in = fopen(in, "rb");
6063
if (f_in == NULL) {
6164
err = CRYPT_FILE_NOTFOUND;

demos/gcm-file/gcm_filehandle.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
@param out The output file
5656
@param taglen The MAC tag length
5757
@param direction Encrypt or Decrypt mode (GCM_ENCRYPT or GCM_DECRYPT)
58+
@param res [out] Result of the operation, 1==valid, 0==invalid
5859
@return CRYPT_OK on success
5960
*/
6061
int gcm_filehandle( int cipher,

0 commit comments

Comments
 (0)