option-parser: Make bools boolean

When option-parser is confronted with a boolean option, have it write a
bool rather than treating the value as a pointer to an int32.

(lib)weston already heavily uses bool types internally, so this has the
nice side effect of eliminating quite a few local variables which only
existed as integer shadows of internal boolean variables.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone
2019-11-26 00:32:22 +00:00
committed by Daniel Stone
parent b8c3926445
commit dd8219b3fb
9 changed files with 51 additions and 86 deletions
+5 -5
View File
@@ -524,13 +524,13 @@ int
zuc_initialize(int *argc, char *argv[], bool *help_flagged)
{
int rc = EXIT_FAILURE;
int opt_help = 0;
int opt_nofork = 0;
int opt_list = 0;
bool opt_help = false;
bool opt_nofork = false;
bool opt_list = false;
int opt_repeat = 0;
int opt_random = 0;
int opt_break_on_failure = 0;
int opt_junit = 0;
bool opt_break_on_failure = false;
bool opt_junit = false;
char *opt_filter = NULL;
char *help_param = NULL;