diff options
author | RALOVICH, Kristof <tade60@freemail.hu> | 2015-05-31 19:07:01 +0200 |
---|---|---|
committer | RALOVICH, Kristof <tade60@freemail.hu> | 2015-05-31 19:07:01 +0200 |
commit | 6854e42db0547f68157bed3293222b312365ac64 (patch) | |
tree | 655f55d3540b35497d481071e894272df66e3133 | |
parent | 69647d9a3e08967c60e7f4c1819c1b9dbe9bc35a (diff) |
tty: call argument only once
-rw-r--r-- | src/SerialTty.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SerialTty.cpp b/src/SerialTty.cpp index 65e4415..24194e2 100644 --- a/src/SerialTty.cpp +++ b/src/SerialTty.cpp @@ -320,10 +320,10 @@ SerialTty::~SerialTty() #define ENSURE_OR_RETURN_FALSE(e) \ do \ { \ - if(-1 == (e)) \ + if((e)<0) \ { \ /*perror(#e);*/ \ - const char* se=strerror(e); \ + const char* se=strerror(errno); \ LOG(antpm::LOG_ERR) << se << "\n"; \ return false; \ } \ |