{
unsigned int updated = 0;
+ int i;
- for (int i = 0; i < MAX_VMS; i++) {
+ for (i = 0; i < MAX_VMS; i++) {
if (strcmp(policies[i].pkt.vm_name, pkt->vm_name) == 0) {
policies[i].pkt = *pkt;
get_pcpu_to_control(&policies[i]);
}
}
if (!updated) {
- for (int i = 0; i < MAX_VMS; i++) {
+ for (i = 0; i < MAX_VMS; i++) {
if (policies[i].enabled == 0) {
policies[i].pkt = *pkt;
get_pcpu_to_control(&policies[i]);
}
rte_delay_us(time_period_s*1000000);
if (policy_is_set) {
- for (int j = 0; j < MAX_VMS; j++) {
+ int j;
+
+ for (j = 0; j < MAX_VMS; j++) {
if (policies[j].enabled == 1)
apply_policy(&policies[j]);
}