void qmp_migrate_set_speed(int64_t value, Error **errp)

{

    MigrationState *s;



    if (value < 0) {

        value = 0;

    }

    if (value > SIZE_MAX) {

        value = SIZE_MAX;

    }



    s = migrate_get_current();

    s->bandwidth_limit = value;

    if (s->file) {

        qemu_file_set_rate_limit(s->file, s->bandwidth_limit / XFER_LIMIT_RATIO);

    }

}

void qmp_migrate_set_speed(int64_t value, Error **errp)

{

    MigrationState *s;



    if (value < 0) {

        value = 0;

    }

    if (value > SIZE_MAX) {

        value = SIZE_MAX;

    }



    s = migrate_get_current();

    s->bandwidth_limit = value;

    if (s->file) {

        qemu_file_set_rate_limit(s->file, s->bandwidth_limit / XFER_LIMIT_RATIO);

    }

}

void FUNC_0(int64_t VAR_0, Error **VAR_1)

{

    MigrationState *s;



    if (VAR_0 < 0) {

        VAR_0 = 0;

    }

    if (VAR_0 > SIZE_MAX) {

        VAR_0 = SIZE_MAX;

    }



    s = migrate_get_current();

    s->bandwidth_limit = VAR_0;

    if (s->file) {

        qemu_file_set_rate_limit(s->file, s->bandwidth_limit / XFER_LIMIT_RATIO);

    }

}

void FUNC_0(int64_t VAR_0, Error **VAR_1)
{ MigrationState *s; if (VAR_0 < 0) { VAR_0 = 0; } if (VAR_0 > SIZE_MAX) { VAR_0 = SIZE_MAX; } s = migrate_get_current(); s->bandwidth_limit = VAR_0; if (s->file) { qemu_file_set_rate_limit(s->file, s->bandwidth_limit / XFER_LIMIT_RATIO); } }