]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- nicer code
authorArvin Schnell <aschnell@suse.de>
Fri, 13 Sep 2013 15:20:48 +0000 (17:20 +0200)
committerArvin Schnell <aschnell@suse.de>
Fri, 13 Sep 2013 15:20:48 +0000 (17:20 +0200)
client/snapper.cc

index 1376909150b73af7be7c361101fab8b86c5e04cf..107c35e71566184d95411f3a45972986b3409b2f 100644 (file)
@@ -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<Cmd>::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' },