1
0
Fork 0

Fix a misuse of a return value that lead to an error message being displayed

when one shouldn't have been.
This commit is contained in:
curt 2005-06-14 17:53:40 +00:00
parent 3f8504cda5
commit d0c8edd02d

View file

@ -411,9 +411,9 @@ void FGExternalPipe::update_binary( double dt ) {
length = sizeof(fdm); length = sizeof(fdm);
cout << "about to read fdm data from remote fdm." << endl; cout << "about to read fdm data from remote fdm." << endl;
result = fread( (char *)(& fdm), length, 1, pd2 ); result = fread( (char *)(& fdm), length, 1, pd2 );
if ( result != length ) { if ( result != 1 ) {
SG_LOG( SG_IO, SG_ALERT, "Read error from named pipe: " SG_LOG( SG_IO, SG_ALERT, "Read error from named pipe: "
<< fifo_name_2 ); << fifo_name_2 << " expected 1 item, but got " << result );
} else { } else {
cout << " read successful." << endl; cout << " read successful." << endl;
} }