]> AND Private Git Repository - loba.git/commitdiff
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Fix error reporting in opt::parse_args.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 6 Jan 2011 08:04:27 +0000 (09:04 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 6 Jan 2011 08:04:27 +0000 (09:04 +0100)
options.cpp

index 827a064935cfa4d2fdeb4572e258c5d22a100d18..56049ed98fd641a14a7ff5e13d9c12806d20e269 100644 (file)
@@ -176,7 +176,8 @@ bool opt::parse_args(int* argc, char* argv[])
             opt::loba_algo = optarg;
             result = opt_helper::nol_find_prefix(opt::loba_algorithms,
                                                  "load balancing algorithm",
             opt::loba_algo = optarg;
             result = opt_helper::nol_find_prefix(opt::loba_algorithms,
                                                  "load balancing algorithm",
-                                                 opt::loba_algo);
+                                                 opt::loba_algo)
+                && result;
             break;
         case 'b':
             opt::bookkeeping = true;
             break;
         case 'b':
             opt::bookkeeping = true;
@@ -213,7 +214,8 @@ bool opt::parse_args(int* argc, char* argv[])
         case 'T':
             opt::auto_depl::topology = optarg;
             result = opt_helper::nol_find_prefix(opt::topologies, "topology",
         case 'T':
             opt::auto_depl::topology = optarg;
             result = opt_helper::nol_find_prefix(opt::topologies, "topology",
-                                                 opt::auto_depl::topology);
+                                                 opt::auto_depl::topology)
+                && result;
             break;
         case 'v':
             // nothing to do: this option is checked at the very
             break;
         case 'v':
             // nothing to do: this option is checked at the very