From f375fc7b7280d27701037d72ee50a949e05a879b Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Sun, 9 Jun 2013 21:01:32 -0400 Subject: [PATCH] Use EXIT_SUCCESS/EXIT_FAILURE. --- tmux-mem-cpu-load.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tmux-mem-cpu-load.cpp b/tmux-mem-cpu-load.cpp index 93ae588..d478d7e 100644 --- a/tmux-mem-cpu-load.cpp +++ b/tmux-mem-cpu-load.cpp @@ -21,6 +21,7 @@ #include #include // sleep #include // for floorf +#include // EXIT_SUCCESS // Apple specific. #if defined(__APPLE__) && defined(__MACH__) @@ -390,18 +391,18 @@ int main(int argc, char** argv) if( graph_lines < 1 ) { std::cerr << "graph lines argument must be one or greater." << std::endl; - return 1; + return EXIT_FAILURE; } } } catch(const std::exception &e) { std::cerr << "Usage: " << argv[0] << " [--colors] [tmux_status-interval(seconds)] [graph lines]" << std::endl; - return 1; + return EXIT_FAILURE; } std::cout << mem_string( use_colors ) << ' ' << cpu_string( cpu_usage_delay, graph_lines, use_colors ) << ' ' << load_string( use_colors ); - return 0; + return EXIT_SUCCESS; }