diff options
author | Moritz Fischer <moritz.fischer@ettus.com> | 2012-10-18 15:33:07 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-10-26 14:00:29 -0700 |
commit | 171e46cebe9c661246d6e313a40f38822d90bbb7 (patch) | |
tree | ac9c7486911a22850492219373e6acfdf99e4b2e /host/examples/rx_ascii_art_dft.cpp | |
parent | 99c9949eb1bbc9f33c838b43890754c816a23033 (diff) | |
download | uhd-171e46cebe9c661246d6e313a40f38822d90bbb7.tar.gz uhd-171e46cebe9c661246d6e313a40f38822d90bbb7.tar.bz2 uhd-171e46cebe9c661246d6e313a40f38822d90bbb7.zip |
examples & utils: return EXIT_FAILURE and EXIT_SUCCESS respectively
instead of 0 and 1.
Diffstat (limited to 'host/examples/rx_ascii_art_dft.cpp')
-rw-r--r-- | host/examples/rx_ascii_art_dft.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/host/examples/rx_ascii_art_dft.cpp b/host/examples/rx_ascii_art_dft.cpp index fe8fb0347..1aede51a4 100644 --- a/host/examples/rx_ascii_art_dft.cpp +++ b/host/examples/rx_ascii_art_dft.cpp @@ -25,6 +25,7 @@ #include <curses.h> #include <iostream> #include <complex> +#include <cstdlib> namespace po = boost::program_options; @@ -63,7 +64,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //print the help message if (vm.count("help") or not vm.count("rate")){ std::cout << boost::format("UHD RX ASCII Art DFT %s") % desc << std::endl; - return ~0; + return EXIT_FAILURE; } //create a usrp device @@ -82,7 +83,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //set the sample rate if (not vm.count("rate")){ std::cerr << "Please specify the sample rate with --rate" << std::endl; - return ~0; + return EXIT_FAILURE; } std::cout << boost::format("Setting RX Rate: %f Msps...") % (rate/1e6) << std::endl; usrp->set_rx_rate(rate); @@ -91,7 +92,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //set the center frequency if (not vm.count("freq")){ std::cerr << "Please specify the center frequency with --freq" << std::endl; - return ~0; + return EXIT_FAILURE; } std::cout << boost::format("Setting RX Freq: %f MHz...") % (freq/1e6) << std::endl; usrp->set_rx_freq(freq); @@ -194,5 +195,5 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //finished std::cout << std::endl << "Done!" << std::endl << std::endl; - return 0; + return EXIT_SUCCESS; } |