data->type, ds->ds_num, data->values_len);
return (-1);
}
+ assert (data->values_len > 0);
/* We need a copy of all the OIDs, because GETNEXT will destroy them. */
memcpy (oid_list, data->values, data->values_len * sizeof (oid_t));
assert (r != NULL);
assert (r_area->ds != NULL);
assert (((size_t) r_area->ds->ds_num) == r->values_num);
+ assert (r->values_num > 0);
- vl.values = (value_t *) calloc (r_area->ds->ds_num, sizeof (value_t));
+ vl.values = (value_t *) calloc (r->values_num, sizeof (value_t));
if (vl.values == NULL)
{
ERROR ("db query utils: malloc failed.");