mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
* more strict const
This commit is contained in:
parent
1e9b55801e
commit
74b91fad28
@ -1011,7 +1011,7 @@ float find_config_tree_float(struct cmd_context *cmd, const char *path,
|
|||||||
return _find_config_float(cmd->cft_override ? cmd->cft_override->root : NULL, cmd->cft->root, path, fail);
|
return _find_config_float(cmd->cft_override ? cmd->cft_override->root : NULL, cmd->cft->root, path, fail);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _str_in_array(const char *str, const char *values[])
|
static int _str_in_array(const char *str, const char * const values[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -1024,9 +1024,8 @@ static int _str_in_array(const char *str, const char *values[])
|
|||||||
|
|
||||||
static int _str_to_bool(const char *str, int fail)
|
static int _str_to_bool(const char *str, int fail)
|
||||||
{
|
{
|
||||||
static const char *_true_values[] = { "y", "yes", "on", "true", NULL };
|
const char * const _true_values[] = { "y", "yes", "on", "true", NULL };
|
||||||
static const char *_false_values[] =
|
const char * const _false_values[] = { "n", "no", "off", "false", NULL };
|
||||||
{ "n", "no", "off", "false", NULL };
|
|
||||||
|
|
||||||
if (_str_in_array(str, _true_values))
|
if (_str_in_array(str, _true_values))
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user