int inet_connect(const char *str, Error **errp)

{

    QemuOpts *opts;

    int sock = -1;



    opts = qemu_opts_create(&dummy_opts, NULL, 0, NULL);

    if (inet_parse(opts, str) == 0) {

        sock = inet_connect_opts(opts, true, NULL, errp);

    } else {

        error_set(errp, QERR_SOCKET_CREATE_FAILED);

    }

    qemu_opts_del(opts);

    return sock;

}

int inet_connect(const char *str, Error **errp)

{

    QemuOpts *opts;

    int sock = -1;



    opts = qemu_opts_create(&dummy_opts, NULL, 0, NULL);

    if (inet_parse(opts, str) == 0) {

        sock = inet_connect_opts(opts, true, NULL, errp);

    } else {

        error_set(errp, QERR_SOCKET_CREATE_FAILED);

    }

    qemu_opts_del(opts);

    return sock;

}

    } else {         sock = inet_connect_opts(opts, true, NULL, errp);
int FUNC_0(const char *VAR_0, Error **VAR_1)

{

    QemuOpts *opts;

    int VAR_2 = -1;



    opts = qemu_opts_create(&dummy_opts, NULL, 0, NULL);

    if (inet_parse(opts, VAR_0) == 0) {

        VAR_2 = inet_connect_opts(opts, true, NULL, VAR_1);

    } else {

        error_set(VAR_1, QERR_SOCKET_CREATE_FAILED);

    }

    qemu_opts_del(opts);

    return VAR_2;

}

int FUNC_0(const char *VAR_0, Error **VAR_1)
{ QemuOpts *opts; int VAR_2 = -1; opts = qemu_opts_create(&dummy_opts, NULL, 0, NULL); if (inet_parse(opts, VAR_0) == 0) { VAR_2 = inet_connect_opts(opts, true, NULL, VAR_1); } else { error_set(VAR_1, QERR_SOCKET_CREATE_FAILED); } qemu_opts_del(opts); return VAR_2; }