From: curt Date: Tue, 14 Jun 2005 17:53:40 +0000 (+0000) Subject: Fix a misuse of a return value that lead to an error message being displayed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d0c8edd02dc6616a6953be09ad332f5381ad7dba;p=flightgear.git Fix a misuse of a return value that lead to an error message being displayed when one shouldn't have been. --- diff --git a/src/FDM/ExternalPipe/ExternalPipe.cxx b/src/FDM/ExternalPipe/ExternalPipe.cxx index a94525448..422023ed1 100644 --- a/src/FDM/ExternalPipe/ExternalPipe.cxx +++ b/src/FDM/ExternalPipe/ExternalPipe.cxx @@ -411,9 +411,9 @@ void FGExternalPipe::update_binary( double dt ) { length = sizeof(fdm); cout << "about to read fdm data from remote fdm." << endl; result = fread( (char *)(& fdm), length, 1, pd2 ); - if ( result != length ) { + if ( result != 1 ) { SG_LOG( SG_IO, SG_ALERT, "Read error from named pipe: " - << fifo_name_2 ); + << fifo_name_2 << " expected 1 item, but got " << result ); } else { cout << " read successful." << endl; }