wmail: strlen returns size_t.
This commit is contained in:
		
							parent
							
								
									d5312c3133
								
							
						
					
					
						commit
						be89c2a7a0
					
				
					 4 changed files with 8 additions and 7 deletions
				
			
		| 
						 | 
					@ -39,6 +39,7 @@ AC_SUBST(X_LIBRARY_PATH)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl Checks for typedefs, structures, and compiler characteristics.
 | 
					dnl Checks for typedefs, structures, and compiler characteristics.
 | 
				
			||||||
AC_C_CONST
 | 
					AC_C_CONST
 | 
				
			||||||
 | 
					AC_TYPE_SIZE_T
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl Checks for library functions.
 | 
					dnl Checks for library functions.
 | 
				
			||||||
AC_FUNC_FNMATCH
 | 
					AC_FUNC_FNMATCH
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -78,8 +78,8 @@ void WARNING( const char *fmt, ... )
 | 
				
			||||||
char *MakePathName( const char *dir, const char *file )
 | 
					char *MakePathName( const char *dir, const char *file )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    char *fullName;
 | 
					    char *fullName;
 | 
				
			||||||
    int len1 = strlen( dir );
 | 
					    size_t len1 = strlen( dir );
 | 
				
			||||||
    int len2 = strlen( file );
 | 
					    size_t len2 = strlen( file );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if( dir[len1-1] != '/' )
 | 
					    if( dir[len1-1] != '/' )
 | 
				
			||||||
	fullName = malloc( len1 + len2 + 2 );
 | 
						fullName = malloc( len1 + len2 + 2 );
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -126,7 +126,7 @@ static enumList_t tickerEnum[] =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static bool Tokenize( const char *line, const char **id, const char **value )
 | 
					static bool Tokenize( const char *line, const char **id, const char **value )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int len;
 | 
					    size_t len;
 | 
				
			||||||
    const char *token1, *token2;
 | 
					    const char *token1, *token2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if( line != NULL )
 | 
					    if( line != NULL )
 | 
				
			||||||
| 
						 | 
					@ -270,7 +270,7 @@ void ReadConfigFile( bool resetConfigStrings )
 | 
				
			||||||
		for( ; !feof( f ); ++line )
 | 
							for( ; !feof( f ); ++line )
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
		    const char *id, *value;
 | 
							    const char *id, *value;
 | 
				
			||||||
		    unsigned int len;
 | 
							    size_t len;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		    if( fgets( buf, 1024, f ) == NULL )
 | 
							    if( fgets( buf, 1024, f ) == NULL )
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -529,7 +529,7 @@ static void WriteChecksumFile( bool writeAll )
 | 
				
			||||||
static void UpdateChecksum( unsigned long *checksum, const char *buf )
 | 
					static void UpdateChecksum( unsigned long *checksum, const char *buf )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if( buf != NULL ) {
 | 
					    if( buf != NULL ) {
 | 
				
			||||||
	unsigned int i, len = strlen( buf );
 | 
						size_t i, len = strlen( buf );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for( i = 0; i < len; ++i )
 | 
						for( i = 0; i < len; ++i )
 | 
				
			||||||
	    *checksum += buf[i] << (( i % sizeof(long) ) * 8 );
 | 
						    *checksum += buf[i] << (( i % sizeof(long) ) * 8 );
 | 
				
			||||||
| 
						 | 
					@ -919,7 +919,7 @@ static char *ParseFromField( char *buf )
 | 
				
			||||||
    char *addressName;
 | 
					    char *addressName;
 | 
				
			||||||
    char *atChar = NULL;
 | 
					    char *atChar = NULL;
 | 
				
			||||||
    char *c;
 | 
					    char *c;
 | 
				
			||||||
    int maxLen = strlen( buf ) + 1;
 | 
					    size_t maxLen = strlen( buf ) + 1;
 | 
				
			||||||
    char *comment;
 | 
					    char *comment;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(( fullName = calloc( maxLen, sizeof *fullName )) == NULL )
 | 
					    if(( fullName = calloc( maxLen, sizeof *fullName )) == NULL )
 | 
				
			||||||
| 
						 | 
					@ -1088,7 +1088,7 @@ static char *ParseFromField( char *buf )
 | 
				
			||||||
static bool SkipSender( char *address )
 | 
					static bool SkipSender( char *address )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    char **skipName;
 | 
					    char **skipName;
 | 
				
			||||||
    int len = strlen( address );
 | 
					    size_t len = strlen( address );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // remove trailing '\n' got from fgets
 | 
					    // remove trailing '\n' got from fgets
 | 
				
			||||||
    if( address[len-1] == '\n' )
 | 
					    if( address[len-1] == '\n' )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue