Hi,
Yeah, and I though we're using glib functions for memory management. All
this realloc and memcpy look ugly.
Thanx,
Jaap
Kukosa, Tomas wrote:
The packet-tpncp.c has dynamically allocated fields array and register
them one by one:
/*
* The function proto_register_field_array can not work with dynamic
arrays,
* so passing dynamic array elements one-by-one in the loop.
*/
for(index = 0; index < hf_size; index++) {
proto_register_field_array(proto_tpncp, &hf[index], 1);
}
Is it really necessary?
Why proto_register_field_array(proto_tpncp, hf, hf_size); can not be used?
I have probably missed something.
Tomas