instr->meter.color_out.struct_id = (uint8_t)color_out_struct_id;
instr->meter.color_out.n_bits = fcout->n_bits;
instr->meter.color_out.offset = fcout->offset / 8;
-
- return 0;
}
/* index = HMEFT, length = HMEFT, color_in = I, color_out = MEF. */
instr->meter.color_out.struct_id = (uint8_t)color_out_struct_id;
instr->meter.color_out.n_bits = fcout->n_bits;
instr->meter.color_out.offset = fcout->offset / 8;
-
- return 0;
}
/* index = I, length = HMEFT, color_in = MEFT, color_out = MEF. */
instr->meter.color_out.struct_id = (uint8_t)color_out_struct_id;
instr->meter.color_out.n_bits = fcout->n_bits;
instr->meter.color_out.offset = fcout->offset / 8;
-
- return 0;
}
/* index = I, length = HMEFT, color_in = I, color_out = MEF. */
instr->meter.color_out.struct_id = (uint8_t)color_out_struct_id;
instr->meter.color_out.n_bits = fcout->n_bits;
instr->meter.color_out.offset = fcout->offset / 8;
-
- return 0;
}
- CHECK(0, EINVAL);
+ return 0;
}
static inline void
instr,
data);
- CHECK(0, EINVAL);
+ return -EINVAL;
}
static struct instruction_data *
/* Memory allocation. */
t = calloc(1, sizeof(struct table));
- CHECK(t, ENOMEM);
+ if (!t)
+ goto nomem;
t->fields = calloc(params->n_fields, sizeof(struct match_field));
if (!t->fields)