diff options
author | Moritz Fischer <moritz@ettus.com> | 2014-04-25 04:29:00 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2014-10-07 12:09:37 +0200 |
commit | 198a0e2d9c9e490e30413cdfb28860fc9ce544ec (patch) | |
tree | 456bdabe477fdb43ebbd00d3b7969adfdf279133 /host/examples | |
parent | e92f7874a7682f603fb18ed7fe7ee71959cc94d8 (diff) | |
download | uhd-198a0e2d9c9e490e30413cdfb28860fc9ce544ec.tar.gz uhd-198a0e2d9c9e490e30413cdfb28860fc9ce544ec.tar.bz2 uhd-198a0e2d9c9e490e30413cdfb28860fc9ce544ec.zip |
examples: Minor change to tx_waveforms example.
Signed-off-by: Moritz Fischer <moritz@ettus.com>
Diffstat (limited to 'host/examples')
-rw-r--r-- | host/examples/tx_waveforms.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp index ba89a8ad5..a233cecb1 100644 --- a/host/examples/tx_waveforms.cpp +++ b/host/examples/tx_waveforms.cpp @@ -139,10 +139,10 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ boost::split(channel_strings, channel_list, boost::is_any_of("\"',")); for(size_t ch = 0; ch < channel_strings.size(); ch++){ size_t chan = boost::lexical_cast<int>(channel_strings[ch]); - if(chan >= usrp->get_tx_num_channels() or chan >= usrp->get_tx_num_channels()){ + if(chan >= usrp->get_tx_num_channels()) throw std::runtime_error("Invalid channel(s) specified."); - } - else channel_nums.push_back(boost::lexical_cast<int>(channel_strings[ch])); + else + channel_nums.push_back(boost::lexical_cast<int>(channel_strings[ch])); } |