static char *qemu_rbd_next_tok(int max_len,

                               char *src, char delim,

                               const char *name,

                               char **p, Error **errp)

{

    int l;

    char *end;



    *p = NULL;



    if (delim != '\0') {

        for (end = src; *end; ++end) {

            if (*end == delim) {

                break;

            }

            if (*end == '\\' && end[1] != '\0') {

                end++;

            }

        }

        if (*end == delim) {

            *p = end + 1;

            *end = '\0';

        }

    }

    l = strlen(src);

    if (l >= max_len) {

        error_setg(errp, "%s too long", name);

        return NULL;

    } else if (l == 0) {

        error_setg(errp, "%s too short", name);

        return NULL;

    }



    return src;

}

static char *qemu_rbd_next_tok(int max_len,

                               char *src, char delim,

                               const char *name,

                               char **p, Error **errp)

{

    int l;

    char *end;



    *p = NULL;



    if (delim != '\0') {

        for (end = src; *end; ++end) {

            if (*end == delim) {

                break;

            }

            if (*end == '\\' && end[1] != '\0') {

                end++;

            }

        }

        if (*end == delim) {

            *p = end + 1;

            *end = '\0';

        }

    }

    l = strlen(src);

    if (l >= max_len) {

        error_setg(errp, "%s too long", name);

        return NULL;

    } else if (l == 0) {

        error_setg(errp, "%s too short", name);

        return NULL;

    }



    return src;

}

static char *FUNC_0(int VAR_0,

                               char *VAR_1, char VAR_2,

                               const char *VAR_3,

                               char **VAR_4, Error **VAR_5)

{

    int VAR_6;

    char *VAR_7;



    *VAR_4 = NULL;



    if (VAR_2 != '\0') {

        for (VAR_7 = VAR_1; *VAR_7; ++VAR_7) {

            if (*VAR_7 == VAR_2) {

                break;

            }

            if (*VAR_7 == '\\' && VAR_7[1] != '\0') {

                VAR_7++;

            }

        }

        if (*VAR_7 == VAR_2) {

            *VAR_4 = VAR_7 + 1;

            *VAR_7 = '\0';

        }

    }

    VAR_6 = strlen(VAR_1);

    if (VAR_6 >= VAR_0) {

        error_setg(VAR_5, "%s too long", VAR_3);

        return NULL;

    } else if (VAR_6 == 0) {

        error_setg(VAR_5, "%s too short", VAR_3);

        return NULL;

    }



    return VAR_1;

}

static char *FUNC_0(int VAR_0,
char *VAR_1, char VAR_2,
const char *VAR_3,
char **VAR_4, Error **VAR_5)
{ int VAR_6; char *VAR_7; *VAR_4 = NULL; if (VAR_2 != '\0') { for (VAR_7 = VAR_1; *VAR_7; ++VAR_7) { if (*VAR_7 == VAR_2) { break; } if (*VAR_7 == '\\' && VAR_7[1] != '\0') { VAR_7++; } } if (*VAR_7 == VAR_2) { *VAR_4 = VAR_7 + 1; *VAR_7 = '\0'; } } VAR_6 = strlen(VAR_1); if (VAR_6 >= VAR_0) { error_setg(VAR_5, "%s too long", VAR_3); return NULL; } else if (VAR_6 == 0) { error_setg(VAR_5, "%s too short", VAR_3); return NULL; } return VAR_1; }