conf: make config_param.num_block_params unsigned
This commit is contained in:
parent
ddc2694419
commit
70d7c79546
@ -91,11 +91,10 @@ static void
|
|||||||
config_param_free(gpointer data, G_GNUC_UNUSED gpointer user_data)
|
config_param_free(gpointer data, G_GNUC_UNUSED gpointer user_data)
|
||||||
{
|
{
|
||||||
struct config_param *param = data;
|
struct config_param *param = data;
|
||||||
int i;
|
|
||||||
|
|
||||||
g_free(param->value);
|
g_free(param->value);
|
||||||
|
|
||||||
for (i = 0; i < param->num_block_params; i++) {
|
for (unsigned i = 0; i < param->num_block_params; i++) {
|
||||||
g_free(param->block_params[i].name);
|
g_free(param->block_params[i].name);
|
||||||
g_free(param->block_params[i].value);
|
g_free(param->block_params[i].value);
|
||||||
}
|
}
|
||||||
@ -449,12 +448,11 @@ struct block_param *
|
|||||||
config_get_block_param(const struct config_param * param, const char *name)
|
config_get_block_param(const struct config_param * param, const char *name)
|
||||||
{
|
{
|
||||||
struct block_param *ret = NULL;
|
struct block_param *ret = NULL;
|
||||||
int i;
|
|
||||||
|
|
||||||
if (param == NULL)
|
if (param == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (i = 0; i < param->num_block_params; i++) {
|
for (unsigned i = 0; i < param->num_block_params; i++) {
|
||||||
if (0 == strcmp(name, param->block_params[i].name)) {
|
if (0 == strcmp(name, param->block_params[i].name)) {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
g_warning("\"%s\" first defined on line %i, and "
|
g_warning("\"%s\" first defined on line %i, and "
|
||||||
|
@ -86,7 +86,7 @@ struct config_param {
|
|||||||
unsigned int line;
|
unsigned int line;
|
||||||
|
|
||||||
struct block_param *block_params;
|
struct block_param *block_params;
|
||||||
int num_block_params;
|
unsigned num_block_params;
|
||||||
};
|
};
|
||||||
|
|
||||||
void config_global_init(void);
|
void config_global_init(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user