/* Return true if the change of command parameter should be notified. */
-static int
-notify_command_param_changed_p (int param_changed, struct cmd_list_element *c)
+static bool
+notify_command_param_changed_p (bool param_changed, struct cmd_list_element *c)
{
- if (param_changed == 0)
- return 0;
+ if (!param_changed)
+ return false;
if (c->theclass == class_maintenance || c->theclass == class_deprecated
|| c->theclass == class_obscure)
- return 0;
+ return false;
- return 1;
+ return true;
}
\f
do_set_command (const char *arg, int from_tty, struct cmd_list_element *c)
{
/* A flag to indicate the option is changed or not. */
- int option_changed = 0;
+ bool option_changed = false;
gdb_assert (c->type == set_cmd);
xfree (*(char **) c->var);
*(char **) c->var = newobj;
- option_changed = 1;
+ option_changed = true;
}
else
xfree (newobj);
xfree (*(char **) c->var);
*(char **) c->var = xstrdup (arg);
- option_changed = 1;
+ option_changed = true;
}
break;
case var_filename:
xfree (*(char **) c->var);
*(char **) c->var = val;
- option_changed = 1;
+ option_changed = true;
}
else
xfree (val);
{
*(bool *) c->var = val;
- option_changed = 1;
+ option_changed = true;
}
}
break;
{
*(enum auto_boolean *) c->var = val;
- option_changed = 1;
+ option_changed = true;
}
}
break;
{
*(unsigned int *) c->var = val;
- option_changed = 1;
+ option_changed = true;
}
}
break;
{
*(int *) c->var = val;
- option_changed = 1;
+ option_changed = true;
}
break;
}
{
*(const char **) c->var = match;
- option_changed = 1;
+ option_changed = true;
}
}
break;
if (*(int *) c->var != val)
{
*(int *) c->var = val;
- option_changed = 1;
+ option_changed = true;
}
}
break;