- Major type rewrite of int to size_t for most variables and arguments used for buffer lengths and loops

This commit is contained in:
Paul Bakker
2011-04-24 08:57:21 +00:00
parent 1be81a4e5f
commit 23986e5d5d
67 changed files with 1041 additions and 949 deletions

View File

@@ -55,7 +55,8 @@
int main( int argc, char *argv[] )
{
int ret = 1, i, n;
int keylen, mode, lastn;
int mode, lastn;
size_t keylen;
FILE *fkey, *fin = NULL, *fout = NULL;
char *p;

View File

@@ -56,7 +56,8 @@
int main( int argc, char *argv[] )
{
int ret = 1, i, n;
int keylen, mode, lastn, olen;
int mode, lastn;
size_t keylen, olen;
FILE *fkey, *fin = NULL, *fout = NULL;
char *p;
@@ -291,7 +292,7 @@ int main( int argc, char *argv[] )
for( offset = 0; offset < filesize; offset += cipher_get_block_size( &cipher_ctx ) )
{
n = ( filesize - offset > cipher_get_block_size( &cipher_ctx ) ) ?
cipher_get_block_size( &cipher_ctx ) : (int) ( filesize - offset );
cipher_get_block_size( &cipher_ctx ) : (unsigned int) ( filesize - offset );
if( fread( buffer, 1, n, fin ) != (size_t) n )
{