static void parse_type_bool(Visitor *v, const char *name, bool *obj,

                            Error **errp)

{

    StringInputVisitor *siv = to_siv(v);



    if (siv->string) {

        if (!strcasecmp(siv->string, "on") ||

            !strcasecmp(siv->string, "yes") ||

            !strcasecmp(siv->string, "true")) {

            *obj = true;

            return;

        }

        if (!strcasecmp(siv->string, "off") ||

            !strcasecmp(siv->string, "no") ||

            !strcasecmp(siv->string, "false")) {

            *obj = false;

            return;

        }

    }



    error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null",

               "boolean");

}

static void parse_type_bool(Visitor *v, const char *name, bool *obj,

                            Error **errp)

{

    StringInputVisitor *siv = to_siv(v);



    if (siv->string) {

        if (!strcasecmp(siv->string, "on") ||

            !strcasecmp(siv->string, "yes") ||

            !strcasecmp(siv->string, "true")) {

            *obj = true;

            return;

        }

        if (!strcasecmp(siv->string, "off") ||

            !strcasecmp(siv->string, "no") ||

            !strcasecmp(siv->string, "false")) {

            *obj = false;

            return;

        }

    }



    error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null",

               "boolean");

}

    if (siv->string) {     if (siv->string) {         if (!strcasecmp(siv->string, "on") ||             !strcasecmp(siv->string, "yes") ||             !strcasecmp(siv->string, "true")) {             *obj = true;         if (!strcasecmp(siv->string, "off") ||             !strcasecmp(siv->string, "no") ||             !strcasecmp(siv->string, "false")) {             *obj = false;     if (siv->string) {     if (siv->string) {
static void FUNC_0(Visitor *VAR_0, const char *VAR_1, bool *VAR_2,

                            Error **VAR_3)

{

    StringInputVisitor *siv = to_siv(VAR_0);



    if (siv->string) {

        if (!strcasecmp(siv->string, "on") ||

            !strcasecmp(siv->string, "yes") ||

            !strcasecmp(siv->string, "true")) {

            *VAR_2 = true;

            return;

        }

        if (!strcasecmp(siv->string, "off") ||

            !strcasecmp(siv->string, "no") ||

            !strcasecmp(siv->string, "false")) {

            *VAR_2 = false;

            return;

        }

    }



    error_setg(VAR_3, QERR_INVALID_PARAMETER_TYPE, VAR_1 ? VAR_1 : "null",

               "boolean");

}

static void FUNC_0(Visitor *VAR_0, const char *VAR_1, bool *VAR_2,
Error **VAR_3)
{ StringInputVisitor *siv = to_siv(VAR_0); if (siv->string) { if (!strcasecmp(siv->string, "on") ||
!strcasecmp(siv->string, "yes") ||
!strcasecmp(siv->string, "true")) { *VAR_2 = true; return; } if (!strcasecmp(siv->string, "off") ||
!strcasecmp(siv->string, "no") ||
!strcasecmp(siv->string, "false")) { *VAR_2 = false; return; } } error_setg(VAR_3, QERR_INVALID_PARAMETER_TYPE, VAR_1 ? VAR_1 : "null",
"boolean"); }