From 57ceb52cc60d9f7da8a40547798d4e1df26e3334 Mon Sep 17 00:00:00 2001 From: Michael West Date: Fri, 1 Nov 2013 16:30:20 -0700 Subject: Readability improvements. --- host/utils/b2xx_fx3_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host') diff --git a/host/utils/b2xx_fx3_utils.cpp b/host/utils/b2xx_fx3_utils.cpp index 3664ecbbf..abc75d248 100644 --- a/host/utils/b2xx_fx3_utils.cpp +++ b/host/utils/b2xx_fx3_utils.cpp @@ -168,7 +168,7 @@ bool parse_record(std::string *record, boost::uint16_t &len, boost::uint16_t &ad 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++) { @@ -412,7 +412,7 @@ boost::int32_t fx3_load_firmware(libusb_device_handle *dev_handle, \ std::string record; file >> record; - if (!record.length() > 0) + if (!(record.length() > 0)) continue; /* Check for valid Intel HEX record. */ -- cgit v1.2.3