From: Arvin Schnell Date: Fri, 13 Sep 2013 15:20:48 +0000 (+0200) Subject: - nicer code X-Git-Tag: v0.1.7~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38d8bdcf75c3de737c47162d9288488893a856f7;p=thirdparty%2Fsnapper.git - nicer code --- diff --git a/client/snapper.cc b/client/snapper.cc index 13769091..107c35e7 100644 --- a/client/snapper.cc +++ b/client/snapper.cc @@ -1356,6 +1356,12 @@ command_cleanup(DBus::Connection* conn, Snapper* snapper) } +void +help_debug() +{ +} + + void command_debug(DBus::Connection* conn, Snapper* snapper) { @@ -1485,10 +1491,7 @@ help() << endl; for (list::const_iterator cmd = cmds.begin(); cmd != cmds.end(); ++cmd) - { - if (cmd->help_func) - (*cmd->help_func)(); - } + (*cmd->help_func)(); exit (EXIT_SUCCESS); } @@ -1520,7 +1523,7 @@ main(int argc, char** argv) #endif cmds.push_back(Cmd("undochange", command_undo, help_undo, false, true)); cmds.push_back(Cmd("cleanup", command_cleanup, help_cleanup, false, true)); - cmds.push_back(Cmd("debug", command_debug, NULL, false, false)); + cmds.push_back(Cmd("debug", command_debug, help_debug, false, false)); const struct option options[] = { { "quiet", no_argument, 0, 'q' },