Replace a couple of erroneous calls to exit() in kdm_cli.cc.
authorCarl Hetherington <cth@carlh.net>
Thu, 24 Aug 2023 15:55:24 +0000 (17:55 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 24 Aug 2023 15:55:24 +0000 (17:55 +0200)
src/lib/kdm_cli.cc

index e8ce6d155fbd2e530febf38137d7d0c46339122d..23a60c9adbf14fbc9347951b70565539002634ed 100644 (file)
@@ -494,7 +494,7 @@ try
                switch (c) {
                case 'h':
                        help (out);
-                       exit (EXIT_SUCCESS);
+                       return {};
                case 'o':
                        output = optarg;
                        break;
@@ -593,12 +593,12 @@ try
                for (auto i: cinemas) {
                        out (String::compose("%1 (%2)", i->name, Emailer::address_list (i->emails)));
                }
-               exit (EXIT_SUCCESS);
+               return {};
        }
 
        if (list_dkdm_cpls) {
                dump_dkdm_group (Config::instance()->dkdms(), 0, out);
-               exit (EXIT_SUCCESS);
+               return {};
        }
 
        if (!duration_string && !valid_to) {