int main(int argc, const char *argv[])
{
struct ctdb_context *ctdb = NULL;
- int interactive = 0;
+ int interactive_opt = 0;
+ bool interactive = false;
struct poptOption popt_options[] = {
POPT_AUTOHELP
- { "interactive", 'i', POPT_ARG_NONE, &interactive, 0,
+ { "interactive", 'i', POPT_ARG_NONE, &interactive_opt, 0,
"don't fork, log to stderr", NULL },
POPT_TABLEEND
};
}
}
+ interactive = (interactive_opt != 0);
+
/*
* Configuration file handling
*/
}
/* start the protocol running (as a child) */
- return ctdb_start_daemon(ctdb, interactive?false:true);
+ return ctdb_start_daemon(ctdb, !interactive);
fail:
talloc_free(ctdb);