summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2013-11-27 12:11:23 -0800
committerBen Hilburn <ben.hilburn@ettus.com>2013-11-27 12:11:23 -0800
commit9e47ad607b597954e786db6614f5b42123184ccd (patch)
treef8f021498105c1144968c989b73e37d51d2e94f9 /host/lib/usrp/usrp2
parent0e3912767266473e08386c910954450d16d33664 (diff)
downloaduhd-9e47ad607b597954e786db6614f5b42123184ccd.tar.gz
uhd-9e47ad607b597954e786db6614f5b42123184ccd.tar.bz2
uhd-9e47ad607b597954e786db6614f5b42123184ccd.zip
Squashed merge of Coverity fixes.
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/usrp2_clk_regs.hpp14
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp2
2 files changed, 13 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_clk_regs.hpp b/host/lib/usrp/usrp2/usrp2_clk_regs.hpp
index 8b185eac0..d5e506d8d 100644
--- a/host/lib/usrp/usrp2/usrp2_clk_regs.hpp
+++ b/host/lib/usrp/usrp2/usrp2_clk_regs.hpp
@@ -22,8 +22,18 @@
class usrp2_clk_regs_t {
public:
- usrp2_clk_regs_t(void) { ; }
+ usrp2_clk_regs_t(void):
+ test(0),
+ fpga(0),
+ adc(0),
+ dac(0),
+ serdes(0),
+ exp(0),
+ tx_db(0),
+ rx_db(0) {}
+
usrp2_clk_regs_t(usrp2_iface::rev_type rev) {
+ fpga = adc = serdes = exp = tx_db = 0;
test = 0;
fpga = 1;
dac = 3;
@@ -54,7 +64,7 @@ public:
//dont throw, it may be unitialized
break;
}
-
+
rx_db = 7;
}
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 3b230ca69..5f97045e1 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -271,7 +271,7 @@ public:
//send and recv
usrp2_ctrl_data_t in_data = this->ctrl_send_and_recv(out_data, MIN_PROTO_COMPAT_I2C);
UHD_ASSERT_THROW(ntohl(in_data.id) == USRP2_CTRL_ID_HERES_THE_I2C_DATA_DUDE);
- UHD_ASSERT_THROW(in_data.data.i2c_args.addr = num_bytes);
+ UHD_ASSERT_THROW(in_data.data.i2c_args.bytes == num_bytes);
//copy out the data
byte_vector_t result(num_bytes);