diff options
author | Michael West <michael.west@ettus.com> | 2013-11-01 16:28:49 -0700 |
---|---|---|
committer | Michael West <michael.west@ettus.com> | 2013-11-01 16:28:49 -0700 |
commit | fddcf720a16e7caccb132d8c66814c2e7e627dfe (patch) | |
tree | a7915ccc195023004fd2a2bafd2d24716d24561e | |
parent | e48622be4eb994571e107ed9536f7d8658098396 (diff) | |
download | uhd-fddcf720a16e7caccb132d8c66814c2e7e627dfe.tar.gz uhd-fddcf720a16e7caccb132d8c66814c2e7e627dfe.tar.bz2 uhd-fddcf720a16e7caccb132d8c66814c2e7e627dfe.zip |
Readability improvements.
-rw-r--r-- | host/lib/usrp/common/fx2_ctrl.cpp | 4 |
1 files 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 |