diff options
author | Christopher R. Hertel <crh@samba.org> | 1998-08-11 18:07:18 +0000 |
---|---|---|
committer | Christopher R. Hertel <crh@samba.org> | 1998-08-11 18:07:18 +0000 |
commit | e1b12729f6ddad97285acb4992ed46a76cca7f74 (patch) | |
tree | 2c6fa593e9ef8906afb2b8c470515f7861244ae9 /source3 | |
parent | 392a9f7225ef78f6cda34dbfe22c63658d4fbff4 (diff) | |
download | samba-e1b12729f6ddad97285acb4992ed46a76cca7f74.tar.gz samba-e1b12729f6ddad97285acb4992ed46a76cca7f74.tar.bz2 samba-e1b12729f6ddad97285acb4992ed46a76cca7f74.zip |
Cleaned up some lint warnings (functions with return values that were
ignored).
(This used to be commit 8fedcfc48da2741722b867bbb056a078901e7431)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/debug.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c index e234084d98..4270150d15 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -200,7 +200,7 @@ void reopen_logs( void ) pstrcpy( debugf, fname ); if( dbf ) - fclose( dbf ); + (void)fclose( dbf ); if( append_log ) dbf = fopen( debugf, "a" ); else @@ -212,14 +212,14 @@ void reopen_logs( void ) force_check_log_size(); if( dbf ) setbuf( dbf, NULL ); - umask( oldumask ); + (void)umask( oldumask ); } } else { if( dbf ) { - fclose( dbf ); + (void)fclose( dbf ); dbf = NULL; } } @@ -252,17 +252,17 @@ static void check_log_size( void ) if( fstat( fileno( dbf ), &st ) == 0 && st.st_size > maxlog ) { - fclose( dbf ); + (void)fclose( dbf ); dbf = NULL; reopen_logs(); if( dbf && file_size( debugf ) > maxlog ) { pstring name; - fclose( dbf ); + (void)fclose( dbf ); dbf = NULL; slprintf( name, sizeof(name)-1, "%s.old", debugf ); - rename( debugf, name ); + (void)rename( debugf, name ); reopen_logs(); } } @@ -294,7 +294,7 @@ va_dcl va_start( ap ); format_str = va_arg( ap, char * ); #endif - vfprintf( dbf, format_str, ap ); + (void)vfprintf( dbf, format_str, ap ); va_end( ap ); errno = old_errno; return( 0 ); @@ -312,7 +312,7 @@ va_dcl dbf = fopen( debugf, "a" ); else dbf = fopen( debugf, "w" ); - umask( oldumask ); + (void)umask( oldumask ); if( dbf ) { setbuf( dbf, NULL ); @@ -371,9 +371,9 @@ va_dcl va_start( ap ); format_str = va_arg( ap, char * ); #endif - vfprintf( dbf, format_str, ap ); + (void)vfprintf( dbf, format_str, ap ); va_end( ap ); - fflush( dbf ); + (void)fflush( dbf ); } check_log_size(); @@ -422,7 +422,7 @@ static void format_debug_text( char *msg ) if( '\n' == msg[i] ) { format_bufr[format_pos] = '\0'; - Debug1( "%s", format_bufr ); + (void)Debug1( "%s", format_bufr ); format_pos = 0; } } @@ -482,7 +482,8 @@ BOOL dbghdr( int level, char *file, char *func, int line ) if( lp_timestamp_logs() || !(lp_loaded()) ) { /* Print it all out at once to prevent split syslog output. */ - Debug1( "[%s, %d] %s:%s(%d)\n", timestring(), level, file, func, line ); + (void)Debug1( "[%s, %d] %s:%s(%d)\n", + timestring(), level, file, func, line ); } return( True ); |