From 3902731cb8a9622204d584c4962c74e2a5a35428 Mon Sep 17 00:00:00 2001 From: Ray Lehtiniemi Date: Tue, 7 Apr 2009 22:19:36 -0600 Subject: [PATCH] Fix up a few ignored return values Signed-off-by: Ray Lehtiniemi --- src/framework/mlt_consumer.c | 6 ++++-- src/miracle/miracle_connection.c | 6 ++++-- src/modules/kino/riff.cc | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index 8636e4b..93afe44 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -409,7 +409,8 @@ int mlt_consumer_start( mlt_consumer this ) // Check and run an ante command if ( mlt_properties_get( properties, "ante" ) ) - system( mlt_properties_get( properties, "ante" ) ); + if ( system( mlt_properties_get( properties, "ante" ) ) == -1 ) + mlt_log( MLT_CONSUMER_SERVICE( this ), MLT_LOG_ERROR, "system(%s) failed!\n", mlt_properties_get( properties, "ante" ) ); // Set the real_time preference this->real_time = mlt_properties_get_int( properties, "real_time" ); @@ -949,7 +950,8 @@ int mlt_consumer_stop( mlt_consumer this ) // Check and run a post command if ( mlt_properties_get( properties, "post" ) ) - system( mlt_properties_get( properties, "post" ) ); + if (system( mlt_properties_get( properties, "post" ) ) == -1 ) + mlt_log( MLT_CONSUMER_SERVICE( this ), MLT_LOG_ERROR, "system(%s) failed!\n", mlt_properties_get( properties, "post" ) ); mlt_log( MLT_CONSUMER_SERVICE( this ), MLT_LOG_DEBUG, "stopped\n" ); diff --git a/src/miracle/miracle_connection.c b/src/miracle/miracle_connection.c index aafb63d..c9ce694 100644 --- a/src/miracle/miracle_connection.c +++ b/src/miracle/miracle_connection.c @@ -129,12 +129,14 @@ static int connection_send( int fd, valerie_response response ) } if ( ( code == 201 || code == 500 ) && strcmp( valerie_response_get_line( response, items - 1 ), "" ) ) - write( fd, "\r\n", 2 ); + if ( write( fd, "\r\n", 2 ) != 2 ) + miracle_log( LOG_ERR, "write(\"\\r\\n\") failed!" ); } else { char *message = "500 Empty Response\r\n\r\n"; - write( fd, message, strlen( message ) ); + if ( write( fd, message, strlen( message ) ) != strlen( message )) + miracle_log( LOG_ERR, "write(%s) failed!", message ); } return error; diff --git a/src/modules/kino/riff.cc b/src/modules/kino/riff.cc index f1dbb5c..44a082c 100644 --- a/src/modules/kino/riff.cc +++ b/src/modules/kino/riff.cc @@ -515,7 +515,7 @@ void RIFFFile::ParseChunk( int parent ) /* Check whether it is a LIST. If so, let ParseList deal with it */ - read( fd, &type, sizeof( type ) ); + fail_if( read( fd, &type, sizeof( type ) ) != sizeof( type )); if ( type == make_fourcc( "LIST" ) ) { typesize = (int) -sizeof( type ); -- 1.7.4.4