From: Bjoern Sikora Date: Mon, 10 Aug 2009 10:29:13 +0000 (+0200) Subject: Improved readability (bool online_mode becomes is_online). X-Git-Tag: v1.1~236 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=98dd88bd3689c0aa478da3d82eaf333fe6f44f1f;p=bpdyndnsd Improved readability (bool online_mode becomes is_online). Replaced numeric representation for bool with true/false keywords. --- diff --git a/src/main.cpp b/src/main.cpp index 8b75bdd..2236b77 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,7 +40,7 @@ using namespace std; Updater::Ptr updater; -bool online_mode = 1; +bool is_online = true; /** * Checks if a bpdyndnsd process is already running. @@ -111,8 +111,7 @@ void terminate(int param) void switch_to_offline(int param) { updater->get_logger()->print_caught_siguser1(); - // TODO: How about using an enum for online_mode instead of magic numbers? - online_mode = 0; + is_online = false; } @@ -124,7 +123,7 @@ void reload_config(int param) { updater->get_logger()->print_caught_sighup(); updater->reload_config(); - online_mode = 1; + is_online = true; } @@ -206,7 +205,7 @@ int main(int argc, char *argv[]) // service processing starts here do { - if ( online_mode == 1 ) + if ( is_online == true ) { // update all configured services updater->update_services();