From fddcf720a16e7caccb132d8c66814c2e7e627dfe Mon Sep 17 00:00:00 2001 From: Michael West Date: Fri, 1 Nov 2013 16:28:49 -0700 Subject: Readability improvements. --- host/lib/usrp/common/fx2_ctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/lib/usrp/common/fx2_ctrl.cpp b/host/lib/usrp/common/fx2_ctrl.cpp index 1cacc45cf..d68bf6058 100644 --- a/host/lib/usrp/common/fx2_ctrl.cpp +++ b/host/lib/usrp/common/fx2_ctrl.cpp @@ -119,7 +119,7 @@ bool parse_record(std::string *record, unsigned int &len, std::istringstream(record->substr(3, 4)) >> std::hex >> addr; std::istringstream(record->substr(7, 2)) >> std::hex >> type; - if (len >2 * (record->length() - 9)) // sanity check to prevent buffer overrun + if (len > (2 * (record->length() - 9))) // sanity check to prevent buffer overrun return false; for (i = 0; i < len; i++) { @@ -184,7 +184,7 @@ public: std::string record; file >> record; - if (!record.length() > 0) + if (!(record.length() > 0)) continue; //check for valid record -- cgit v1.2.3