diff --git a/src/GenericParser.h b/src/GenericParser.h index 09e42146..86c6ca92 100644 --- a/src/GenericParser.h +++ b/src/GenericParser.h @@ -91,7 +91,7 @@ typename Parser::ResultType parseFile(Parser& parser, // TODO Overrode a2open(const char*,..) and a2open(const std::wstring&,..) while ((fd = a2open(utf8ToWChar(filename).c_str(), O_BINARY | O_RDONLY, OPEN_MODE)) == -1 && - errno != EINTR) + errno == EINTR) ; if (fd == -1) { return Parser::ParserStateMachineType::noResult(); diff --git a/src/XmlParser.cc b/src/XmlParser.cc index dde216c6..15b273d7 100644 --- a/src/XmlParser.cc +++ b/src/XmlParser.cc @@ -52,7 +52,7 @@ bool parseFile(const std::string& filename, ParserStateMachine* psm) else { while ((fd = a2open(utf8ToWChar(filename).c_str(), O_BINARY | O_RDONLY, OPEN_MODE)) == -1 && - errno != EINTR) + errno == EINTR) ; if (fd == -1) { return false;