From d0c8edd02dc6616a6953be09ad332f5381ad7dba Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 14 Jun 2005 17:53:40 +0000 Subject: [PATCH] Fix a misuse of a return value that lead to an error message being displayed when one shouldn't have been. --- src/FDM/ExternalPipe/ExternalPipe.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }