use the return value from read

This commit is contained in:
Markus Gans 2015-08-10 00:04:25 +02:00
parent 31c9d86dba
commit 1e0f42d3b6
1 changed files with 4 additions and 4 deletions

View File

@ -3390,8 +3390,8 @@ FString FTerm::getAnswerbackMsg()
fflush(stdout); fflush(stdout);
usleep(150000); // wait 150 ms usleep(150000); // wait 150 ms
// read the answerback message // read the answerback message
read(fileno(stdin), &temp, sizeof(temp)-1); if ( read(fileno(stdin), &temp, sizeof(temp)-1) > 0 )
answerback = temp; answerback = temp;
} }
return answerback; return answerback;
} }
@ -3412,8 +3412,8 @@ FString FTerm::getSecDA()
fflush(stdout); fflush(stdout);
usleep(150000); // wait 150 ms usleep(150000); // wait 150 ms
// read the answer // read the answer
read(fileno(stdin), &temp, sizeof(temp)-1); if ( read(fileno(stdin), &temp, sizeof(temp)-1) > 0 )
sec_da = temp; sec_da = temp;
} }
return sec_da; return sec_da;
} }